How to convert Base64 to an image
- Paste a data URI (starting with
data:image/…;base64,) or a raw Base64 string. - Press Decode to file. The tool detects the real file type from its first bytes (its "magic number"), so it works even when the prefix is missing or wrong.
- Check the preview and size, then press Download to save the image with the correct extension.
Where you meet Base64 images
Developers often find images as Base64 inside API responses, JSON exports, database fields, HTML email source, CSS files and browser developer tools. AI image APIs commonly return generated pictures as Base64 strings, and canvas exports produce data URIs. This tool turns any of them back into a normal file you can open, edit or share.
Besides images, the decoder recognises PDFs, ZIP archives and icons, and anything else is saved as a binary file. Line breaks, spaces and URL-safe characters in the input are handled automatically. If the string is damaged or truncated, which often happens when copying from logs, you get a clear error rather than a broken file.
Decoding happens in your browser using built-in functions. The image is never uploaded, so this is safe for screenshots, scanned documents and other private pictures.
FAQ
Why does my Base64 image not display?
The string may be truncated, contain extra characters from a log line, or be a different file type. The status line shows the detected type and size so you can tell.
Which image formats are supported?
PNG, JPEG, GIF, WebP, SVG and ICO are detected and previewed. Other formats are decoded and can be downloaded as raw files.
Is there a size limit?
Strings of tens of megabytes decode fine on most devices, since everything happens in memory on your computer or phone.