Encoding 🔒 Runs in your browser — no data sent to servers

Base64 Decoder

Paste a Base64 string and see it decoded as you type: readable text, an image preview or a file to download.

Input
Output

Decode Base64 Online

Base64 turns binary data into plain letters and digits so it can travel through JSON, email, HTML and URLs. When you meet a long string of such characters in an API response, a configuration file, a Kubernetes secret or an email source, decoding it shows what is actually inside.

This page opens the Base64 Encoder & Decoder set up to decode as you paste. Decoding runs in your browser, which matters because Base64 strings often contain credentials or personal data.

Diagram: the text “Man” as bytes and bits, regrouped into four 6-bit values that become the Base64 string “TWFu”.TextBytesBits6-bit valuesBase64M77a97n11001001101011000010110111019T22W5F46u
Base64 takes three bytes (24 bits), cuts them into four 6-bit values from 0 to 63 and writes each one as a character: “Man” becomes “TWFu”. That is why encoded data grows by about a third.

What the decoder handles for you

  • Whitespace and line breaks, as in MIME email bodies wrapped at 76 characters.
  • Base64URL with - and _, used in JWTs and URLs.
  • Missing padding: the trailing = signs are optional.
  • Data URIs such as data:image/png;base64,….
  • UTF-8 text, including accents, emoji and non-Latin scripts.

Text, image or file?

After decoding, the bytes are checked. If they are valid UTF-8 text and not a recognised binary format, the text is shown. If they start with the signature of a PNG, JPEG, GIF, WebP, PDF or ZIP file, you get a preview for images and a Download button with the right file extension. That is how you recover an attachment or an embedded image from its Base64 form.

Common reasons decoding fails

SymptomLikely causeFix
"Not valid Base64"Quotes, a key name or other text copied alongPaste only the encoded value
Offered as a file although it should be textThe text was not UTF-8, for example Windows-1252Download it and open it with that encoding
Output looks like more Base64The data was encoded twiceDecode the result again
"Not valid Base64" on a long, clean stringThe string was cut offCopy the complete value

Decoding in code and on the command line

Linux and macOS: echo 'SGVsbG8=' | base64 --decode. PowerShell: [Text.Encoding]::UTF8.GetString([Convert]::FromBase64String('SGVsbG8=')). JavaScript: new TextDecoder().decode(Uint8Array.from(atob(s), c => c.charCodeAt(0))) decodes to UTF-8 correctly, which plain atob does not. Python: base64.b64decode(s).decode().

To inspect a token rather than raw Base64, the JWT Decoder decodes and formats its header and payload. To go the other way with a picture, use Image to Base64.

Guides