Base64 Decoder
Decode Base64 back into readable text or into the original file. The tool tolerates line breaks, spaces, URL-safe characters, missing padding and data: URI prefixes. Binary results are recognised from their magic bytes (PNG, JPEG, PDF, ZIP and more) and offered as a download with the right extension.
Decode Base64
Decoded text
Details
Image preview
Your download
How to Use the Base64 Decoder
- Paste the Base64 text, with or without line breaks, padding or a data: prefix.
- Keep Detect automatically, or force text or file output.
- Press Decode.
- Read the text result, or use the download link for binary data. Images also get a preview.
About This Tool
Developers inspecting API responses, email source or config files, and anyone who has a Base64 blob and needs to know what is inside it.
Input: Base64 text ยท Output: Text or file.
Features and Limitations
Features
- Understands both standard and URL-safe alphabets and tells you which it found.
- Adds missing = padding and ignores whitespace.
- Detects PNG, JPEG, GIF, WebP, PDF, ZIP/Office, MP3, MP4, SVG and other types from their first bytes.
- Clear error with the position of the first invalid character.
- Strips data:...;base64, prefixes automatically.
Limitations
- Type detection looks at the first bytes only; it is a strong hint, not proof of what a file really is.
- If the data is not valid UTF-8 text it is treated as a file; forcing text output on binary data is refused.
- Decoded files are offered for download and are never opened or executed; treat unknown files with the same care as any download.
- Very large inputs (tens of megabytes) depend on your browser's memory.
- Results are computed in your browser; nothing you enter is sent to a server.
Example
SGVsbG8sIFdvcmxkIQ== decodes to
Hello, World!. A string starting
iVBORw0KGgo is detected as a PNG image and offered
as decoded.png.
Frequently Asked Questions
Why do I get an invalid character error?
Base64 only uses A-Z, a-z, 0-9, + and / (or - and _ in the URL-safe form). The message names the first other character and its position, which is often a stray quote, comma or smart quote.
My Base64 has no = at the end. Is that a problem?
No. Missing padding is accepted and restored. The result details tell you when it was added.
How does the tool know the file type?
Most formats start with a fixed signature, for example PNG files begin with the bytes 89 50 4E 47. The tool compares the first bytes with a list of known signatures.
Why is my result shown as a file instead of text?
The decoded bytes are not valid readable UTF-8, or contain control characters, so they are probably binary. You can still download them.
Is the data uploaded?
No. Decoding happens in your browser and the download is created locally.
Related Tools
More like this: all Encoding & Security tools, all Developer & Web tools or the TinySandy home page.