Base64 Decoder
Paste a Base64 string or a data URI to decode it instantly. Readable text is shown directly; binary data such as a PNG, JPEG, PDF or ZIP is identified from its file signature so you can download it with the right name. URL-safe input, line breaks and missing padding are fixed automatically. Nothing is uploaded.
Updated
How to use the Base64 Decoder
- 1Paste the Base64 string, or a complete data URI.
- 2The decoded text appears immediately.
- 3If the data is binary, use the download button to save it as a file.
- 4Copy the text if that is what you needed.
How it works
Input is normalised before decoding: URL-safe characters are converted back, whitespace and line breaks are stripped, and missing padding is restored. That means a string copied out of a wrapped email header decodes without manual cleanup.
The decoded bytes are then examined. If they form valid UTF-8, the text is shown directly. If not, the data is binary, and the first bytes are checked against known file signatures to identify what it is — PNG, JPEG, PDF, ZIP and so on — so the download gets a sensible name and type.
Invalid Base64 is reported clearly. The most common causes are a truncated string, a mix of standard and URL-safe alphabets, or stray characters picked up during copying.
Everything runs in this page. Nothing you paste is transmitted, logged or stored, which is what makes it safe to drop a production payload in here while you are debugging.
Tips and common mistakes
- Paste a whole data URI if you have one; the prefix is handled for you.
- If decoding fails, check that the string was not cut short when it was copied.
- Use the download button for binary data; the file type is detected from its first bytes.
- Treat a decoded file like any other download and only open it if you trust where it came from.