Getting the image out
Copy the base64
From an HTML email's source, a page's source code, a JSON export or an API response. A full
data:image/...;base64,URI is fine; the prefix is removed for you.Paste it into the box
Line breaks and spaces inside the base64 are ignored, so text wrapped by an email client still works.
Check the preview
If the data is an image, it appears with its type and size in bytes. If it is valid base64 but not an image, the tool says so.
Download
Press Download image to save it as image.png, image.jpg or whichever type was detected.
Example: a logo stuck inside an email signature
A marketing assistant needs a client's logo for a proposal, but the only copy is embedded in an HTML email signature as a data URI. She views the email source, copies the long string starting data:image/png;base64,iVBORw0KGgo and pastes it in.
The tool shows the logo, reports it as image/png with its size in bytes, and offers it as image.png. Trying the tiny test image below gives a one-pixel PNG of 70 bytes, a quick way to confirm the tool and the data are working.
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==
image/png, 70 bytes Download image (image.png)
How the type is recognised
The tool ignores whatever type the data: prefix claims and looks at the first bytes of the decoded data instead.
| Image type | Starts with | Downloaded as |
|---|---|---|
| PNG | The bytes 89 50 4E 47 | .png |
| JPEG | FF D8 FF | .jpg |
| GIF | The letters GIF | .gif |
| WebP, BMP, ICO | Their own file signatures | .webp, .bmp, .ico |
| SVG | SVG markup | .svg |
When it says the data is not an image
That usually means the base64 holds something else, such as a PDF, a font or plain text. Try the base64 decoder for text, or the data URL generator's check mode, which reports the type and decoded size of any data URL. If you get an invalid base64 error, part of the string is probably missing: long values are easy to cut short when copying.
URL-safe base64, which uses - and _, is accepted and converted to the standard alphabet before decoding, because data URIs do not accept the URL-safe characters.
Questions people ask
How do I convert base64 to an image?
Paste the base64 string into the box. The tool decodes it in your browser, checks the first bytes to see what kind of image it is and shows a preview. Then press Download image to save it as a file with the correct extension.
Do I need to remove the data:image/png;base64, part?
No. If the text starts with a data: prefix, the tool removes it before decoding. You can paste either the full data URI or just the base64 characters after the comma, and the result is the same, because the type is read from the data anyway.
Why does the preview not appear?
Either the text is not valid base64, often because part of it was lost when copying, or it decodes to data that is not a recognised image type. The message under the box says which. Check that you copied the whole string, which can be thousands of characters long.
Is the image uploaded to convert it?
No. Decoding, detection and the preview all happen in the page, and the download is created from data already in your browser. Nothing you paste is sent anywhere, which matters when the image is a client's logo or a scanned document you have not been asked to share.
Where your data goes
The base64 you paste is decoded in your browser and the image file is built locally for download. Nothing is uploaded or kept.
Checked against the tool on