Base64 Image Decoder
Paste a Base64 string or a full data URI to preview the image and download it. Works even without the data: prefix — the format is detected from the bytes.
{{ error }}
{{ warning }}
{{ filename }}
All decoding happens in your browser. Nothing you paste is ever uploaded to a server.
About decoding Base64 images
A Base64 string is just text that represents the bytes of a file. Decoding it gives you the original image back, byte for byte — nothing is lost, because Base64 is an encoding rather than a compression format.
You don't need the data: prefix
Most decoders insist on a full data:image/png;base64,… URI. This one reads the file
signature — the first few bytes, sometimes called magic bytes — from the decoded data, so a bare
Base64 payload is enough. It recognises PNG, JPEG, GIF, WebP, BMP, ICO, TIFF, AVIF, HEIC and SVG.
You can also paste an entire CSS url() rule or an <img> tag and the
data URI is pulled out of it.
If the format is labelled wrong, the bytes win
Hand-edited data URIs often carry the wrong MIME type — a JPEG labelled image/png, for
example. The detected signature is trusted over the label, the download gets the correct extension,
and you get a warning explaining the mismatch.
Blank preview usually means a truncated string
If the signature looks valid but the image won't render, the Base64 is almost always incomplete — copying from a log file or a terminal window frequently drops the end. Copy the whole string and try again.
Going the other way?
Use the Base64 image encoder to turn an image file into a data URI.
Frequently asked questions
Do I need the "data:image/png;base64," prefix?
No. Paste the raw Base64 on its own and the format is detected from the file signature in the decoded bytes. You can also paste a whole CSS url() rule or an <img> tag and the data URI will be pulled out of it.
Why does it say my image is not a recognised format?
The Base64 decoded cleanly, but the resulting bytes do not match any known image signature. The most common cause is a truncated string — copying from a log or terminal often drops the end.
The preview is blank but there was no error. Why?
The file signature looked valid but the browser could not finish decoding the image, which almost always means the Base64 string is incomplete. Try copying it again in full.
Is it safe to decode an SVG here?
Yes. Decoded SVGs are rendered inside an <img> element, where scripts embedded in the SVG cannot execute, and the tool never opens the decoded file as a top-level page.
Does my data get uploaded?
No. Decoding happens entirely in your browser. Nothing you paste is sent to a server.