1. Home
  2. Generators & Encoders
  3. Base64 Encode / Decode

Online Base64 Encode & Decode

Type text, or pick a file up to about 8 MB. Encode turns it into Base64 (or a data URL). Decode turns Base64 back into text, an image preview, or a download. Nothing is uploaded.

What it is for?
Runs in your browser Free, no sign-up

What it is for?

About Base64

Base64 turns any bytes into 64 letters, numbers, + and /. That string can sit inside JSON, CSS, e-mail or an HTML src attribute. Typed text is first converted to UTF-8, so ç, ğ and emoji round-trip. A chosen file is read as raw bytes, not as text.

Data URLs

If you tick “Encode as a data URL”, the result starts with a prefix such as data:image/png;base64, then the Base64. You can paste that into CSS background-image or an img src. Keep this for small icons. A multi-megabyte data URL makes the page heavy.

Decode

Paste Base64 or a data URL, then press Decode. If the bytes are a PNG, JPEG, GIF or WebP, a preview is shown and you can download the image. If the bytes are text, you see the text. If they are other binary, you get a file download. Invalid Base64 is rejected; the page does not guess.

It stays in the browser

Nothing is uploaded. Files larger than 8 MB are refused so the tab does not freeze. To shrink a photo to WebP or AVIF, use the image converter.