Base64 to Image Converter
Paste Base64 text or a full data URI and see the picture it contains. The tool cleans up whitespace, fixes missing padding, works out the real file type from the decoded bytes instead of trusting the label, shows the image and lets you download it with the right extension.
Convert Base64 to an Image
Preview
Details
Your download
How to Use the Base64 to Image
- Paste the Base64 text or data URI into the box.
- Press Decode.
- Check the preview and the detected type, size and dimensions.
- Use the download link to save the image file.
About This Tool
Developers debugging API responses and database fields, and anyone who received an image as a long Base64 string and needs the actual file.
Input: Base64 / data URI ยท Output: PNG / JPG / GIF / WebP / BMP / SVG.
Features and Limitations
Features
- Accepts raw Base64 or a complete data URI, with or without line breaks.
- Detects PNG, JPEG, GIF, WebP, BMP, ICO, AVIF and SVG from the file's magic bytes.
- Validates the text and explains what is wrong when decoding fails.
- Safe preview: the image is shown through an image element, never as markup.
- Downloads with the correct file extension.
Limitations
- The text must contain image data; other kinds of Base64 (PDF, ZIP, plain text) are rejected with a message.
- Corrupt or truncated data may decode to a broken image, in which case the preview is reported as failed.
- Inputs above about 20 million characters are refused.
- If the label in a data URI disagrees with the real content, the real content wins and you are told.
- Results are computed in your browser; nothing you enter is sent to a server.
Example
Pasting a tiny PNG as a data URI, for example one that begins data:image/png;base64,iVBORw0KGgo, shows the picture with its detected type (PNG), its size in bytes and its pixel dimensions, and offers decoded-image.png for download.
Frequently Asked Questions
Do I need to remove the data:image prefix?
No. Paste the whole data URI or just the Base64 part; both work.
Why does it say the data is not an image?
The decoded bytes did not start with a known image signature. The string may be a different file type, truncated, or not Base64 at all.
Can it decode SVG?
Yes. SVG is shown through an image element, which does not run scripts, and is downloaded as an .svg file. Only open SVG files from sources you trust.
What does URL-safe Base64 mean?
It uses - and _ instead of + and /. The tool converts them automatically.
Is my data sent anywhere?
No. Decoding happens in your browser.
Related Tools
More like this: all Image Conversion tools, all Image & Design tools or the TinySandy home page.