Base64 Decoder
Developer ToolsDecode Base64 back to text or to the original file, with encoding in the same tool.
Runs entirely in your browser โ nothing is uploaded
Features
- Decode and encode in the same tool โ switch direction without losing your input.
- Accepts standard and URL-safe alphabets, missing padding, whitespace and data: URI headers.
- Recognises binary payloads, shows a hex view and lets you download the real file.
- Identifies PNG, JPEG, GIF, WebP, PDF, ZIP, gzip and more from their signatures.
- Points at the exact character that broke the input when it is not valid Base64.
- Detects JSON output and offers to pretty-print it.
How to use the Base64 Decoder
- 1Paste the Base64 string โ a data: URI header is fine, it is stripped for you.
- 2Read the decoded text, or download the file if the payload turns out to be binary.
- 3Pretty-print it if the result is JSON, or hit Encode to go the other way.
Frequently asked questions
Why do I get mojibake?
You should not any more. If the bytes are not UTF-8 text โ an image or a gzip payload, say โ the tool now says so, identifies the format where it can, shows a hex view and offers the file as a download instead of printing replacement characters at you.
Can I turn a Base64 string back into an image file?
Yes. Paste it in and the tool recognises the format from the leading bytes, then the Download button saves it with the right extension. A full data: URI works too โ the header is detected and removed before decoding.
My string will not decode. What is wrong?
The error names the offending character and its position. The usual causes are a stray quote or comma copied along with the value, a URL-encoded "+" that arrived as a space, or a value that was truncated in transit โ a Base64 string's length is always a multiple of four once padding is added.
Can I encode here too?
Yes โ this page and the Base64 Encoder are the same tool, and the Encode/Decode switch at the top moves between them. There is also a button that sends the output straight into the other direction, which is the quickest way to check a value round-trips.