Base64 to Image Converter
Decode a Base64 string or data URL back to an image, preview it, and download the file, with the real format verified from its bytes.
How it works
- Paste a bare Base64 string or a full data: URL — either form is accepted, and wrapping whitespace is ignored.
- The payload is decoded and verified by its magic bytes: the real format wins over any declared type, and the size and dimensions are reported.
- Preview the image when it is safe to do so (never for SVG), then download it with the correct file extension.
Frequently Asked Questions
What input does it accept?
A full data URL, or a bare Base64 string with no prefix. Whitespace and line wrapping are tolerated, and the URL-safe alphabet is accepted as well as the standard one.
Is the declared MIME type trusted?
No. A data URL’s media type is just text that whoever produced it chose. Every payload is re-checked against its magic bytes, the sniffed format wins, and any disagreement is reported. Non-image types such as text/html are refused outright rather than passed through to a preview or a download.
Why will it not preview an SVG?
Because SVG is a document format, not just pixels: it can contain scripts, event handlers and external references. It is decoded and offered for download with a clear warning, but it is not rendered here. Never inline SVG you did not write into a page.
What if the string is corrupt?
You get a specific message — invalid Base64, an empty payload, an unrecognised format, or a non-image type — instead of a broken image icon.