How to convert Base64 to an image
- Paste the Base64 code of the image, with or without the
data:imageprefix. - The image preview appears together with its format, file size and dimensions.
- Enter a file name if you like and click Download to save the image.
Supported image formats
PNG, JPEG, GIF (including animations), WebP, SVG, BMP, ICO and AVIF are recognised from the first bytes of the data, so the correct file extension is chosen even when the string has no data URI prefix. A PNG in Base64 starts with iVBORw0KGgo, a JPEG with /9j/ and a GIF with R0lGOD.
Data URI or raw Base64?
A data URI such as data:image/png;base64,iVBORw0… contains the MIME type followed by the Base64 data. Raw Base64 is just the part after the comma. This tool accepts both and also ignores line breaks and spaces.
Frequently asked questions
Why is no image shown?
The string may be incomplete (copied only partly), may contain a different file type, or may be encoded twice. The message under the input box tells you which file type was detected.
Can I convert the Base64 image to JPG or PNG?
The image is saved in its original format. To change it, download it and use a free image converter, for example our sister site linked below.
Is there a size limit?
No fixed limit. Images of several megabytes decode in a fraction of a second because everything runs on your own device.