Base64 decode text online

Encode and decode Base64, URLs and HTML entities. Handles emoji.

People decode Base64 to read something that was packed into it: the middle part of a web token, a value in a log line, a string from an API response or a header copied from a request. This page opens on the Base64 tab in decode mode. Paste the text and the result appears as you type. Both alphabets are accepted, so a value with - and _ works as well as one with + and /, spaces and line breaks are ignored, and missing = padding does not matter. The bytes are read as UTF-8, so accents and emoji come back correctly. If the Base64 is valid but the bytes are not text, as with an image, a compressed file or an encrypted blob, the page says that it is not text and offers the bytes as a download, not a screen of broken characters. If the input is not Base64 at all, the message points to the first character that does not belong. Decoded markup such as a script tag is shown as plain text and is never run.

How it works

  1. Paste your text
  2. Choose encode or decode
  3. Copy the result

Frequently asked questions

Why does the decoded text of a web token look like JSON?

A token has three parts split by dots. The first two are URL-safe Base64 of JSON, so you can paste one part at a time and read it. The third part is a signature and usually decodes to bytes, not text, so the page offers it as a download.

What does the position in the error message mean?

It counts the characters you typed, starting at 1 and counting spaces, up to the first one that is not allowed in Base64. In !!!abc the position is 1. An = in the middle of the text, or three = at the end, is also pointed out.

Can I decode Base64 into a file such as a PNG?

Not as an image. If the bytes are not UTF-8 text, the page lets you download the raw bytes as a .bin file. Rename it, for example to .png, if you know what it is. Nothing is previewed.