Prefix-optional parsing
Accepts bare Base64, complete data URIs, CSS url() wrappers and strings with embedded line breaks — it normalises all of them before decoding.
Decode a Base64 string or data URI back into a viewable image.
Loading tool…
The tool is loading its code on your device. This happens once and is cached for later visits.
Processed entirely on your device
Overview
Paste Base64 image data and preview it instantly, then download as PNG, JPG or WebP. Detects the MIME type automatically and explains decode errors.
This is the reverse of the Image to Base64 tool, and it turns up in more situations than you would expect: debugging an API response, checking whether an image survived a database round trip, recovering an asset from an HTML email, or verifying that a build step inlined the right file.
Real-world Base64 rarely arrives clean. The parser handles:
url("data:image/png;base64,…") wrapper, quoted or unquoted;= padding, which some encoders omit.Whitespace is stripped and padding is restored before decoding, so a payload that would fail a strict atob() call still works here.
Invalid character means something outside the Base64 alphabet is present. If you see % characters the string is still URL-encoded — run it through the URL decoder first. If you see - or _ it is base64url, which this tool translates automatically.
Truncated data means the payload decoded but the image structure is incomplete — typically a copy that stopped early. Compare the character count against what the source claims.
Unrecognised format means the bytes decoded cleanly but do not begin with a known image signature. The data may be a document, an archive or simply not Base64 image data.
A data URI's declared MIME type is written by whoever created it, and it is frequently wrong — especially after a file has been renamed or passed through a system that guesses types from extensions. Reading the first few decoded bytes tells you what the image actually is, which is why the detected format is shown separately from the declared one and used to pick the default download extension.
Step by step
Paste the Base64 string — with or without the data:image/...;base64, prefix.
Press Decode; the preview appears as soon as the bytes are valid.
Read the detected format, dimensions and decoded file size.
Download in the detected format, or re-encode to PNG, JPG or WebP.
If decoding fails, check the error hint — usually a stray line break or truncation.
Why use it
What this tool is good for, and what it deliberately does not try to do.
Accepts bare Base64, complete data URIs, CSS url() wrappers and strings with embedded line breaks — it normalises all of them before decoding.
Seeing the decoded image is the only reliable way to confirm a string was transferred intact. Dimensions and byte count are shown alongside.
Invalid characters, wrong padding and truncated payloads each produce a specific message rather than a blank preview.
Decode a WebP data URI and save it as a PNG, or normalise an unknown format into something your CMS will accept.
Questions
Short, honest answers about quality, limits and privacy.