Base64 Decoder
Paste a Base64 string and see it decoded as you type: readable text, an image preview or a file to download.
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.
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
| Symptom | Likely cause | Fix |
|---|---|---|
| "Not valid Base64" | Quotes, a key name or other text copied along | Paste only the encoded value |
| Offered as a file although it should be text | The text was not UTF-8, for example Windows-1252 | Download it and open it with that encoding |
| Output looks like more Base64 | The data was encoded twice | Decode the result again |
| "Not valid Base64" on a long, clean string | The string was cut off | Copy 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.