Base64 to Image
Paste Base64 or a data URI, get the image: format verified from the real bytes, safe preview, correct extension on download, and exact errors when the string is broken. All in your browser.
File to Base64
Drag a file here or browse
Any file type · up to 50 MB · converted locally in bounded chunks, the file never leaves your browser
Base64 to file
Paste Base64 or a full data: URI. The decoded size is estimated before anything runs, the type is verified against the actual bytes, and you can download the result.
Strict Base64 validator (RFC 4648)
Checks alphabet, padding, length and canonical pad bits. Valid, canonical, normalized and malformed are four different verdicts, and this validator tells you which one you have.
Base64 ↔ hex
Bounded at 2 MB of data per direction. Bytes with no valid UTF-8 meaning are fine here: hex is the binary-safe view.
Trust the signature, not the label
Base64 image payloads arrive from screenshots in tickets, API responses, email source and database dumps, and a surprising share of them are mislabeled: a JPEG behind an image/png header, a PDF behind an image header, occasionally something worse. This decoder treats the declared MIME type as a claim to verify: the detected signature is shown beside it, mismatches are flagged, and the preview and file extension follow the bytes. Broken strings get precise diagnostics, including the truncation case where the length can prove the string lost its tail.
Base64 to image FAQ
How do I turn a Base64 string back into an image?
Paste the string, or a complete data:image/...;base64,... URI, into the "Base64 to file" box on the File tab above. The decoded size is estimated before anything runs, the actual format is detected from the file signature in the bytes, a preview appears for raster images, and the download button saves the file with the correct extension. You can edit the file name before downloading.
Why does my Base64 image not display?
The usual causes, in order: the data URI header is missing or lacks the ;base64 flag, the string was truncated in transit (length modulo 4 equal to 1 is the giveaway, and this tool points at it), whitespace or quotes got pasted into the middle, or the bytes are simply not an image even though the header claims so. The decoder here names the exact problem and position instead of showing a broken icon.
The data URI says image/png but the tool says otherwise. Who is right?
The bytes are right. A data URI header is just a claim: anyone can write image/png in front of any payload. This tool reads the actual file signature, shows both the declared and detected types, warns on mismatch, and uses the detected type for the preview and extension. A payload whose declared and real types disagree deserves suspicion, especially if it arrived from outside.
Why is there no preview for SVG?
Because SVG is not a passive image: it is an XML document that can contain scripts and external references, and rendering untrusted SVG is a known attack vector. Decoded SVG here is identified, downloadable and viewable as text, but never rendered live. PNG, JPEG, GIF, WebP and AVIF preview normally since they are passive raster data.
Is the image data uploaded to decode it?
No. The whole pipeline, validation, decoding, signature detection, preview and download, is JavaScript in your tab. Screenshots in bug reports, images pasted from emails and payloads pulled from APIs stay on your machine.
More free tools: Image to Base64 · Base64 to Text · Base64 Validator · Full Base64 Workbench