Free tool · runs in your browser
Base64 to image converter
Paste a Base64 string or data URL to see the image inside it and download it as a file.
Quick answer
Paste a Base64 string or a full data URL, and the image appears right away, with its format, file size and dimensions. The format is detected from the data itself, so you do not need the data:image prefix. It recognises PNG, JPG, GIF, WebP, BMP, ICO, AVIF and SVG. Press Download to save the file with the right extension.
How to use it
- Paste the Base64. With or without the data:image/...;base64, part. Line breaks are fine.
- Check the preview. See the image, format, file size and dimensions.
- Download. Save it as a file with the right extension.
Example
This Base64 decodes to a 1 × 1 pixel PNG:
Input
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M/wHwAEBgIApD5fRAAAAABJRU5ErkJggg==Output
Format: image/png
Dimensions: 1×1
File: image.pngCommon errors and how to fix them
This contains characters that are not valid in Base64- Remove anything that is not part of the data, such as quotes or url( ) around it.
This Base64 is incomplete- The string has been cut off. Copy all of it again.
Frequently asked questions
How do I convert Base64 to an image?
Paste the text here. The image shows straight away, ready to download.
Do I need the data:image prefix?
No. The tool works out the format from the first bytes of the data, whether the prefix is there or not.
Why does it say the data is not an image?
The Base64 decoded, but the result is not a known image format. It may be a different file type, such as a PDF.
Why does it say the Base64 is incomplete?
The text was probably cut off when copied, which is common with long strings. Copy it again in full.
Does URL-safe Base64 work?
Yes. The - and _ variants used in URLs and tokens are converted automatically, and missing = padding is added back.
Can an SVG here run scripts?
The preview shows it as an image, and browsers do not run scripts inside images. Be careful where you open a downloaded SVG from an unknown source, though.
How is it different from the Base64 decoder?
That tool decodes Base64 into text. This one decodes it into an image you can see and download.
Is my data uploaded?
No. Decoding happens in your browser.
Where do Base64 images usually come from?
Data URLs in HTML, CSS or email source, and API responses in JSON. To make one yourself, use the image to Base64 tool.
Can I change the format of the decoded image?
Yes. Download it, then use the image converter to save it as JPG, PNG or WebP.
Sources
Related
More tools in this group
- Image compressor
- Image resizer
- Image cropper
- Background remover
- Image colour picker
- Image blur tool
- Favicon generator