Prefix-optional parsing
Accepts a bare payload, a full data URI with any MIME type and any parameters after it, base64url with dashes and underscores, and strings broken across hundreds of lines.
A Base64 to image converter that decodes a string or data URI back into a picture you can view and save.
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 or a data URI, preview the picture instantly and download it with the right extension — the format is read from the decoded bytes.
This is the reverse of the Image to Base64 tool, and a Base64 to image conversion 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. In every one of them the fastest route to an answer is a Base64 to image decode that happens on the spot — the string is parsed, decoded and rendered in the browser, with nothing installed, nothing uploaded and nothing to sign up for.
Real-world Base64 rarely arrives clean. The parser handles:
- and _ where standard Base64 writes + and /;= padding the encoder left off.Whitespace is removed and the URL-safe alphabet is translated back before anything is decoded, so a string that a strict atob() call would reject still works here. Two things are not accepted, and both are quick to fix by hand: a CSS url("…") wrapper, where you should paste only what is inside the quotes, and a percent-encoded string, which needs the URL decoder first. Whatever shape the string arrived in, the Base64 to image conversion starts from the same place: clean characters in, decoded bytes out.
There are three distinct outcomes, and each one points somewhere different.
Stray characters or a truncated paste is the parser refusing the string before any decoding is attempted. Something outside the Base64 alphabet is present — usually % sequences from a URL-encoded copy, or a fragment of the surrounding JSON, CSS or log line that came along with the payload.
Decoded to zero bytes means the string was legal Base64 but empty in substance. A stray = or two on their own will produce it.
Could not be decoded as an image is the informative one. The Base64 was valid and real bytes came out, but nothing recognised those bytes as a picture. Either the copy stopped early and the file is incomplete, or the payload was never an image to begin with. Check the character count against the source before assuming corruption: a truncated data URI is far more common than a corrupt one, and a payload that turns out to be a PDF or a zip is more common still.
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 decoded bytes tells you what the image actually is: PNG opens with 89 50 4E 47, JPEG with FF D8 FF, GIF with GIF8, WebP with RIFF and then WEBP four bytes later, and SVG simply contains an <svg tag, because it is text rather than binary. The Format row therefore reports what the signature says rather than what the prefix claimed, and that is what picks the extension you download. Bytes do not lie about themselves, which makes signature detection the most trustworthy stage of any Base64 to image converter.
Rendering the image is not decoration, it is the test. The decoded blob is loaded into an <img> element before the result panel appears, so a payload that produces bytes but not a viewable picture is reported as a failure instead of handed to you as a broken download. That is the difference between this and a atob() call in a console: the console confirms the string was legal, the preview confirms the image survived — which is the entire point of a Base64 to image check.
Because it genuinely renders, the dimensions and the decoded size are measurements rather than claims. If a database round trip, an email client or a copy-paste truncated the payload, those numbers will not match the source — and you find out here, in one step, rather than three steps later when something else refuses the file.
The situations that bring people to this page are remarkably consistent: an API response with an image field and no way to look at it, a <img src="data:…"> pulled out of an HTML email, a column in a database dump, a build step that inlined an asset and you want to know which one, a QR or signature payload from a payment or KYC flow. In all of them the question is the same — is this the picture I think it is? — and a Base64 to image conversion answers it in one paste.
There is a second, quieter use case: asset archaeology. Data URIs embedded in old templates, cached pages or exported documents are sometimes the only surviving copy of a logo or an icon, and decoding them here — with the real extension attached — is how you dig the file back out. It is the same Base64 to image conversion either way: paste the string, read the preview, download the file.
Everything in this Base64 to image converter runs locally. The string you paste never leaves the tab: it is parsed, decoded and rendered by the browser's own APIs, and the download is a local file that never touches a server. That matters because the payloads that need this check are rarely public — they are customer photographs, KYC documents, internal screenshots and payment signatures, and a Base64 to image tool that uploaded them somewhere to decode them would defeat its own purpose. So this one does not: no account, no queue, no upload. Paste the string, read the preview, download the file, done.
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.
Rename the file if you want to, then download it in the format the bytes turned out to be.
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 a bare payload, a full data URI with any MIME type and any parameters after it, base64url with dashes and underscores, and strings broken across hundreds of lines.
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.
The decoded signature picks the extension, so a payload that arrived with no prefix at all still saves as .jpg, .png, .gif, .webp or .svg — and you can set the file name before downloading.
Questions
Short, honest answers about quality, limits and privacy.