Base64 to Image Converter
Decode a Base64 string or data URI back into a downloadable image.
What Is This Tool?
This tool decodes a Base64 image string back into a real image file. It accepts a bare Base64 payload or a full data: URI; if the MIME type is missing it is guessed from the decoded bytes. The image is shown as a preview and can be saved to disk.
How It Works
Paste your Base64 text or data: URI into the box.
Click Decode.
The image appears with its detected type and dimensions.
Click Download image to save it.
Everything runs locally in your browser — the image you choose is decoded onto an HTML canvas on your own device and is never uploaded to a server.
Features
- Accepts raw Base64 or a full data: URI
- Auto-detects PNG, JPEG, GIF, WebP and BMP from the bytes
- Shows dimensions and decoded size
- Clear error message if the string is not valid Base64
- Runs entirely in the browser
Common Use Cases
- Recovering an image that was stored as text in a database
- Inspecting a data URI copied from a stylesheet or HTML
- Turning an API’s Base64 image field into a file
- Debugging an inline image that is not rendering
Frequently Asked Questions
It says "invalid Base64" — what is wrong?
The string probably has stray characters, line breaks that were not part of the data, or it was truncated when copied. Make sure you pasted the whole value. A data: URI must keep its prefix intact.
Do I need the data: prefix?
No. If you paste only the Base64 payload, the tool decodes it and detects the image type from the file signature. The prefix just makes the type explicit.
What image types are supported?
Any type the browser can display: PNG, JPEG, GIF, WebP and BMP are all detected automatically.
Why is the downloaded file a different size than the Base64 text?
Base64 is about a third larger than the binary it represents, so the decoded image file is smaller than the text you pasted.
Is anything sent to a server?
No. Decoding uses atob and a Blob in your browser.