Base64 to Image

Decode Base64 image data, preview and download the image.

Paste a Base64 string or a full data URL and see the image it contains, then download it as a file. The tool detects PNG, JPEG, GIF, WebP, SVG and BMP data, and shows the type and size. It is handy for debugging API responses, database fields and CSS that embed images.

What is Base64 image data?

Images can be stored as text by Base64-encoding their bytes. Such strings often appear as data URLs, like data:image/png;base64,iVBORw0KGgo..., or as bare Base64 inside JSON and databases. The first bytes of an image file are a recognisable signature, called magic bytes: PNG files start with bytes that encode to iVBORw0KGgo, JPEG with /9j/, GIF with R0lGOD, WebP with UklGR and BMP with Qk. When there is no data: prefix, this tool uses those signatures to work out the image type.

How to use Base64 to Image

  1. Paste the data Put the Base64 string or data URL into the Base64 or data URL box.
  2. Check the preview The decoded image appears below with its type and size, for example image/png, 70 B.
  3. Download Click Download image to save the file.
  4. Fix errors If an error appears, check the text is complete and is an image format.

Frequently asked questions

Do I need the data:image prefix?

No. Bare Base64 works if the image is PNG, JPEG, GIF, WebP, SVG or BMP, because the type is detected from the first bytes.

Which formats can it detect?

PNG, JPEG, GIF, WebP, SVG and BMP. Other formats need a data URL with an image MIME type to be accepted.

Why is my preview broken?

The Base64 may be truncated or corrupted, so the browser cannot draw it even though it decodes. Copy the full string again.

Is the data sent anywhere?

No. Decoding and preview happen in the page, and the download is created locally.

Can I convert an image to Base64?

Yes, use the Image to Base64 tool, which gives you a data URL or raw Base64 for any supported image.