Decode Base64 back into an image
Paste a Base64 string — either a bare payload or a full data: URI — and get
the image back, ready to view and download. This is the reverse of embedding
an image as Base64 in CSS, HTML or JSON, and it is handy for inspecting data URIs
pulled from a stylesheet, API response or saved page.
How it works
If the input starts with a data:image/...;base64, prefix, the tool reads the
exact MIME type from it. For a bare payload it decodes the bytes and sniffs the
type from the file’s magic numbers — for example a PNG starts with 89 50, a
JPEG with FF D8, and a BMP with 42 4D. The decoded bytes are wrapped in a
Blob of the right type, rendered as a preview, and offered for download with the
matching extension.
Example
Pasting data:image/png;base64,iVBORw0KGgo... shows the PNG preview and offers a
.png download. Pasting the same payload without the prefix still works — the
leading bytes 89 50 4E 47 identify it as PNG automatically.
| Detected bytes | Image type | Extension |
|---|---|---|
89 50 | PNG | .png |
FF D8 | JPEG | .jpg |
47 49 | GIF | .gif |
42 4D | BMP | .bmp |
Everything happens in your browser with the built-in atob and Blob APIs —
nothing is uploaded.