Base64 Decoder

Paste Base64 into the Base64 field to read it as text, or switch to Base64 → File to get the original file back, with its type detected and an image preview. Line breaks, spaces and missing padding are ignored.

  • Free
  • No upload
  • No sign-up

Base64 encoder and decoder

UTF-8 safe for accents and emoji. Decoding ignores line breaks and missing padding.

Runs entirely in your browser. Your data, files and text are never uploaded.

Decoding Base64 safely

The decoder accepts both alphabets: the standard one with + and / and the URL-safe one with - and _ used in JWTs and links. Whitespace and line breaks, as in email attachments wrapped at 76 characters, are skipped, and missing = padding is added back automatically.

Anything that is not valid Base64 is reported with its position, so a stray quote copied from code or a truncated string is easy to spot. The decoded bytes are read as UTF-8 text; when they are not text, switch to Base64 → File.

In file mode the first bytes are inspected to recognize common types such as PNG, JPEG, GIF, WebP, PDF, ZIP and MP3, and the file name gets the right extension. Data URLs like data:image/svg+xml;base64,… are understood as well, including their MIME type.

How to use the Base64 Decoder

  1. Paste the Base64 string into the Base64 field; the decoded text appears in the Text field.
  2. If the result is a file rather than text, choose Base64 → File and paste it there instead.
  3. Check the detected file type and the image preview, and adjust the file name if you like.
  4. Download the decoded file or copy the decoded text.

Frequently asked questions

Why does my decoded text look like random symbols?

The Base64 probably contains a file, such as an image or a ZIP, not text. Use Base64 → File to download it with the detected type.

Can I decode a JWT token here?

Yes, piece by piece: paste the header or payload part between the dots. They use the URL-safe alphabet without padding, which the decoder accepts. The signature part is binary and not readable text.

What does "invalid character" mean?

The input contains a character that Base64 never uses, for example a quote or a comma copied with the string. The message shows where it is, so you can remove it.

Are decoded files safe to open?

Decoding only rebuilds the bytes; it does not run them. Open a decoded file only if you trust where the Base64 came from, as with any download.