IT Image Tools

Base64 to Image

Decode a Base64 string or data URI back into an image, preview it and download it as a file. Free, instant and 100% in your browser.

πŸ”’ Runs entirely in your browser β€” nothing is uploaded

Advertisement

Turn Base64 text back into an image

Base64 is a way of writing binary data as plain text, and it is how images end up inside JSON responses, HTML emails, CSS files, database fields and API payloads. This Base64 to image converter reverses the process: paste the text, and you get the original picture back, ready to preview and save as a normal file.

You can paste either a bare Base64 string or a complete data URI such as data:image/png;base64,iVBORw0…. The tool strips the header, cleans up whitespace and line breaks, accepts URL-safe characters and fixes missing padding before decoding the bytes locally.

Automatic format detection

Instead of trusting the declared MIME type, the decoder inspects the first bytes of the file to recognise PNG, JPEG, GIF, WebP, BMP, AVIF, ICO and SVG images. That means a string with no header, or one labelled with the wrong type, still produces a correctly named download. The status line shows the detected format, the pixel dimensions and the file size so you can quickly verify that the result is what you expected.

Private by design

Base64 strings often come from logs, API responses or databases and can contain sensitive pictures. Everything here runs in your browser using atob and Blob URLs β€” the text you paste is never sent to a server. If the string is not valid Base64, or decodes to something that is not an image, you get a clear message instead of a broken download.

Troubleshooting

  • Make sure you copied the whole string; a truncated value usually fails to decode or shows a half-drawn image.
  • Remove surrounding quotes, JSON escapes such as \n and any url(…) wrapper.
  • If the string decodes but is not an image, it may be a PDF or another file type β€” try a different tool.
  • To go the other way, use the Image to Base64 tool.

How to use

  1. Paste the Base64Paste a Base64 string or a full data URI into the box.
  2. DecodeClick Decode image to see a preview with its type, dimensions and size.
  3. DownloadClick Download image to save the decoded file with the right extension.

Frequently asked questions

Which Base64 formats are accepted?
Either a plain Base64 string or a full data:image/png;base64,… URI. URL-safe Base64 and strings with line breaks or missing padding also work.
How does the tool know the image type?
It reads the file signature (magic bytes) of the decoded data, so PNG, JPEG, GIF, WebP, BMP, AVIF, ICO and SVG are detected even if the data URI header is missing or wrong.
Is my Base64 text uploaded?
No. Decoding uses atob and Blob objects in your browser, so nothing leaves your device.
Advertisement