Skip to main content
FileForge

Base64 to Image Converter

Paste Base64 image data — with or without the data URI prefix — to preview it and download it as a normal image file.

Runs in your browser — files never leave your device

Free · No sign-upOutputs PNG, JPG, WebP, GIF
Loading tool…

How to use Base64 to Image

  1. Paste the Base64 string or data URI into the text area.

  2. The preview appears automatically when the data is valid.

  3. Check the detected format and dimensions.

  4. Click Download image.

About this tool

This tool decodes Base64 image data back into a file you can save and open. It accepts full data URIs (data:image/png;base64,…) as well as bare Base64 strings, detects the image type from the data itself, and shows a live preview before you download. Useful when extracting images from API responses, email source, CSS files or database fields.

This is the reverse of the Image to Base64 tool, and often needed together with it — for example, pulling an inline image out of an email's HTML source or a database export so you can view and save it as a normal file again.

Common ways people use this

  • Extracting and saving an image embedded in an API response as Base64 text
  • Recovering a viewable image file from a database export or config file that stored it inline
  • Pulling an inline image out of an HTML email's source code to save separately

Tips for better results

  • If you copied the string from an email client, check for stray line breaks — some email software inserts them into long Base64 strings, which will need to be removed first.
  • You don't need to strip the `data:image/...;base64,` prefix yourself — paste the full data URI and the tool handles it automatically.

Frequently asked questions

Do I need to include the data:image prefix?
No. Both full data URIs and bare Base64 strings work — the image type is detected from the decoded bytes.
Why does the tool say my Base64 is invalid?
Common causes are truncated strings (copied partially), URL-encoded characters like %2B instead of +, or line breaks inserted by an email client. The error message indicates what was found.
Is the decoded image private?
Yes. Decoding happens in your browser; the data is never transmitted.
What image formats can this tool detect?
It recognizes PNG, JPG, GIF and WebP from the decoded byte signature, regardless of what the original file was named.
My Base64 string looks URL-encoded — will this still work?
If the tool detects characters like %2B or %2F, it will let you know the string needs to be URL-decoded first. Use the URL Decoder tool on it, then paste the result here.