Decode Base64 encoded strings back to images instantly with our free Base64 to Image Converter . This tool transforms Base64 data URIs into viewable JPEG, PNG, GIF, WebP, and SVG images — perfect for recovering embedded images from HTML, CSS, or API responses. Paste a string, preview the image, and download it as a file. No software installation needed, and nothing is uploaded.
Base64 represents binary image bytes as plain text so they can travel inside text formats; decoding reverses that, turning the string back into the original pixels. This is handy when an API hands you an image as a Base64 field, or when you find a data: URI embedded in a stylesheet and want the actual file. To go the other way and encode an image, use the Image to Base64 tool.
A short data URI decodes back into a real image file you can download. The MIME prefix tells the browser what format the bytes represent:
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+M8AAAMBAQDJ/pLvAAAAAElFTkSuQmCClogo.png (1x1 transparent pixel) A data URI packages a file inline as text using the form data:[mimetype];base64,[data]. The MIME type — such as image/png or image/jpeg — declares the format, and the Base64 segment after the comma holds the actual image bytes encoded as printable ASCII. Decoding simply reverses the encoding: it reads the Base64 text, converts each group of four characters back into three binary bytes, and reconstructs the original image file the browser can render or you can download.
The format of the output is determined entirely by that MIME prefix, not by the file extension. A string prefixed data:image/png;base64, always decodes to a PNG, even if you save it as .jpg. That is why this tool reads the prefix to set the correct download extension and Content-Type. If the prefix is missing or wrong, the bytes still decode but the browser may not recognise them as an image, producing a broken or blank result.
Common sources of Base64 image strings are REST API responses (where binary uploads are serialised as JSON text), embedded email attachments, data URIs in CSS sprites, and exported configuration files. After recovering the file you may want to inspect its metadata with the Image Data Extractor or convert its format with SVG to PNG.
data:image/png;base64, vs data:image/jpeg;base64, for the actual format. data:...;base64, prefix is intact.