Skip to content
Devtoolry

Base64 to Image

Decode a Base64 string or data URI to an image online: preview it, see its type, size and dimensions, and download it as PNG, JPEG, SVG, WebP or GIF.

Something not working, or missing a feature? Send feedback

About the Base64 to Image

The Base64 to Image decoder turns a Base64 string or data URI back into an image, so you can see what an API response, database field or inline CSS image actually contains. It detects the real file type from the decoded bytes, shows the size and dimensions, and lets you download the file.

Images are processed in your browser with its built-in codecs, so your photos and screenshots are never uploaded.

How to use the Base64 to Image

  1. Paste the Base64 text or the full data URI. Line breaks, missing padding and Base64URL are handled.
  2. Check the preview, the detected type, the file size and the pixel dimensions.
  3. Download the image with the right file extension.

Common mistakes

  • Double encoding. If the decoded result is Base64 text again rather than an image, the data was encoded twice. Decode it once with the Base64 tool, then paste the result here.
  • URL-escaped data. Base64 copied from a URL may contain %2B and %2F instead of + and /. URL-decode it first.

Works well with the Base64 to Image

Frequently asked questions

Why does it say the data is not an image?

The decoded bytes do not start with the signature of a supported format (PNG, JPEG, GIF, WebP, AVIF, BMP, ICO or SVG). The text may be cut off, encoded twice, or contain a different kind of file such as a PDF.

The data URI says image/jpeg but the tool shows PNG. Which is right?

The tool trusts the file signature in the bytes over the declared type, so the image really is a PNG. Fix the declared type in your code so browsers and other tools are not misled.

Is it safe to preview an SVG from an unknown source?

Yes, here. The image is shown in an <img> element, where scripts inside an SVG never run. Opening the downloaded SVG directly in a browser tab is different, so be careful with files from untrusted sources.