Hunt
Skip to content

Base64 to Image

Paste Base64 image data, with or without its data:image/…;base64, prefix, to see the image, its real format and dimensions, and download it with the right extension. Handy for images embedded in JSON, API responses, CSS or emails. Nothing is uploaded.

Runs in your browser

Base64

Paste Base64 or press Sample

Image

The image will appear here.

Finding the format

The format is detected from the decoded data's first bytes, not from the data URL's label, which is sometimes wrong. PNG, JPEG, GIF, WebP, AVIF, BMP, ICO and SVG are previewed. Other files, such as PDFs, are recognised and offered as a download.

How to use the Base64 to Image

  1. Paste the Base64 or data URL, or press Sample.
  2. See the image, its format, dimensions and size.
  3. Download it with the right file extension.

Examples

A data URL

Input
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAMUlEQVR42mNQTX5NEmKgpob/SIBYG9BUj2ogWQOmHLU1YEpjNYIBT3LAVE3txIcVAQBxE6juTdcndAAAAABJRU5ErkJggg==
Output
png, 106 bytes

Base64 without a prefix

Input
R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==
Output
gif, 43 bytes

The classic 1 × 1 transparent GIF used for tracking pixels. Its format is found from its first bytes, GIF89a.

Limitations

  • The input can be up to about 10 MB of Base64.
  • HEIC and TIFF images can't be previewed in most browsers.

Frequently asked questions

Is my data uploaded?

No. Decoding and the preview happen in your browser.

Why does it say the data isn't an image?

The Base64 decodes to something else, such as text or a PDF. Check that you copied the image data and not the surrounding JSON or HTML.

How do I convert an image to Base64?

Use Image to Base64.