Base64 to Image Decoder: Preview and Download

This Base64 to image decoder turns a Base64 string or a data URI back into a picture you can see and save. Paste the text, with or without the data:image prefix, and the tool decodes it in your browser, reads the first bytes of the file to find the true image type, shows a preview with its width, height and size, and lets you download it with the correct file extension. It handles URL-safe Base64, line breaks, missing padding and CSS url() values, and it tells you clearly when the text is not a valid image.

Base64 to Image Decoder

Decode a Base64 string or data URI into an image. Detects PNG, JPG, GIF, WebP, SVG, AVIF and more, shows a preview and lets you download it.

Everything runs in your browser. Nothing you type is sent to a server.

How to use the Base64 to Image Decoder

  1. Paste the Base64 string or data URI into the box, or load a text file that contains it.
  2. The image is decoded straight away and shown with its detected type, size and pixel dimensions.
  3. If the text is not valid Base64 or not an image, a message explains what is wrong.
  4. Download the image file or copy a clean data URI.

Features

  • Accepts raw Base64, data URIs and CSS url(...) values
  • Detects PNG, JPEG, GIF, WebP, SVG, BMP, ICO, AVIF and HEIC from the file bytes
  • Handles URL-safe Base64, line breaks and missing padding
  • Shows file size, pixel dimensions and a type mismatch warning
  • Downloads with the right file extension
  • Works offline, nothing is uploaded

Frequently asked questions

How do I convert Base64 to an image?

Paste the Base64 text into the box. The tool decodes it, shows the picture and gives you a Download button. You do not need to remove the data:image/png;base64, prefix first.

How does the tool know if it is a PNG or a JPG?

It reads the first bytes of the decoded data, called magic bytes. A PNG starts with a fixed signature, a JPEG starts with FF D8 FF, and so on. This is more reliable than trusting the text before the comma in a data URI.

Why does it say the Base64 is not valid?

Base64 can only contain letters, digits, plus, slash and equals signs. A stray character, a cut-off string or text that is not Base64 at all will cause this message. Check that you copied the whole value.

Can I decode an SVG image?

Yes. SVG is text, so the tool recognizes the svg tag after decoding, shows it as an image and saves it as an .svg file.

Is my image uploaded anywhere?

No. The decoding, preview and download all happen in your browser, and the data never leaves your device.

Four steps to decode Base64 to an image: paste Base64 or a data URI, the format is detected, preview, download
How to turn Base64 into an image.
Base64 prefixes by image type: PNG starts with iVBORw0KGgo, JPEG with /9j/, GIF with R0lGOD and WebP with UklGR
How to recognize the image type from Base64.