Base64 Decoder

Paste a Base64 string and press Decode Base64. Padding, line breaks, and URL-safe characters are handled for you, and the bytes are also shown as hex and binary.

Try an example

About this Base64 decoder

Base64 strings show up in API responses, configuration files, email sources, data URIs, and tokens. This decoder turns them back into what they were. It accepts standard and URL-safe Base64, strings without padding, strings broken over several lines, and data: URIs, then shows the result as text in the encoding you choose. When the data is not text, such as an image or a compressed file, the hex and binary views show the raw bytes so you can see what you are dealing with. Decoding runs in your browser.

How to decode Base64

  1. Paste the Base64. Paste the string, or press an example. An example only fills the box.
  2. Pick the text encoding. UTF-8 fits almost all modern text. Try Latin-1 or UTF-16 if the result looks garbled.
  3. Press Decode Base64. The decoded text appears with its size, followed by the same bytes in hex and binary.
  4. Copy the result. Press Copy text or Download.

Frequently asked questions

Can I decode a JWT with this?

Yes. A JWT has three parts separated by dots. Paste the first or second part on its own to read the header or the payload as JSON. The third part is a signature and decodes to unreadable bytes.

Why does the decoded text contain � characters?

The bytes are not valid text in the chosen encoding. Either the text was saved in another encoding, so try Latin-1 or UTF-16, or the data is not text at all, such as an image; the hex view shows the raw bytes.

Does missing = padding matter?

No. Padding is added automatically when it is missing, so strings from URLs and JWTs decode as they are.

Can I paste a data: URI?

Yes. A prefix such as data:image/png;base64, is removed before decoding, and spaces and line breaks inside the string are ignored.

What makes a string invalid Base64?

Characters outside A–Z, a–z, 0–9, + and / (or - and _ for URL-safe), or a length that leaves a single character in the last group of four. Check that the string was copied completely.