Follow this example to turn encoded image data back into a usable file. Open Base64 to Image.
Paste the image data
Open Base64 to Image and paste a plain Base64 string or a complete image data URL. Try a sample fills the same field with a real PNG example. You do not need to upload a separate file.
A data URL includes a prefix such as data:image/png;base64,. Plain Base64 contains just the encoded characters. Whitespace and line breaks inside the data are ignored.
If your code is inside an HTML image or CSS declaration, copy only the data URL. The full HTML element or CSS declaration cannot be decoded as an image.
Use Image to Base64 Converter when you need to go in the other direction.
Check the preview before exporting
Select Continue. The converter checks the Base64 characters, image file signature, any declared MIME type and whether the browser can open the result.
A data URL declaring JPG while containing PNG bytes is rejected. Incomplete text, unsupported files and files above the limits are also rejected. This avoids silently saving a misleading file extension.
The example uses the favicon-orbit.png sample, a 512 × 512 PNG containing 202,491 bytes. Its preview should show the same colorful icon artwork. If you change the pasted code in the editor, select Preview image to check the replacement.
The preview helps identify the image. Do not rely on a filename or a declared MIME type alone.
The example in this guide
Try a sample to fill the data URL for favicon-orbit.png. Select Continue, confirm the 512 × 512 preview, then Start and Download. Compare the downloaded PNG bytes with the source sample.
- Decoded format
- PNG
- Image dimensions
- 512 × 512 px
- Original image bytes
- 202,491 bytes
- Conversion
- Decoding without recompression
Download the recovered image
Select Start, then Download to save decoded-image.png for this example. The converter detects the original format; it does not ask you to choose a different one.
Decoding restores the original bytes. It does not resize, redraw or recompress the image, and it preserves existing metadata and GIF animation. Use another image tool after downloading if you want to resize, compress or convert the result.
The downloaded sample has the same 202,491 bytes as its source PNG. The short data URL excerpt shown here is only for illustration; a truncated string will not produce the full image.
Download the result before refreshing the page, which starts a new workflow.
Know the formats, limits and privacy boundary
PNG, JPG, WebP, GIF, BMP and AVIF are supported when the browser can decode them for preview. A decoded image can be up to 25 MB, 60 megapixels and 16,000 pixels per side. The text input also has a bounded length. SVG markup and arbitrary binary files are not supported.
The pasted data is decoded and previewed on your device without being uploaded for conversion. Base64 is not encryption: anybody with the complete string can reconstruct the image.
Keep a private image’s encoded text private as well.
Common questions
How do I convert Base64 to an image?
Paste a plain Base64 string or image data URL, select Continue, check the preview, then select Start and Download.
Can I paste a complete HTML image tag?
Use only the data URL inside its src attribute. A complete HTML element or CSS declaration is not accepted.
Will the picture lose quality?
No. Decoding recovers the original image bytes without resizing or recompression.
Can I choose JPG instead of PNG?
This tool restores the encoded file in its original format. Use an image converter afterward to change formats.
Why is my data URL rejected?
The data may be incomplete, exceed a limit, contain an unsupported format or declare a MIME type that does not match the actual image.
Is the Base64 data uploaded?
No. The converter decodes and previews the image locally in your browser.
Recover the picture, confirm it and save its original file.
Try a sample or use your own file, and review the result before sharing.