Base64 to Image

Decode Base64 or a data URL back into an image you can view and download

Paste Base64 image data or a data:image URL to see the image, check its format, size and dimensions, and download it as a file. PNG, JPG, GIF, WebP, BMP, ICO, SVG and AVIF are recognised automatically.
Try an example:

Output will appear here...

About Base64 to Image

How it works

  1. The data: prefix, quotes, spaces and line breaks are removed, leaving the Base64 text. URL-safe Base64 (- and _) is accepted too.
  2. The Base64 is decoded to bytes, and the first bytes (the "magic number") reveal the real image format - even if the data URL claims a different one.
  3. The image is shown with its dimensions and file size, and Download saves it with the right file extension.

What you need

  • Base64-encoded image data - for example copied from CSS, HTML, JSON or an API response.

Tips

  • Paste a whole CSS line like url("data:image/png;base64,...") - the url() wrapper is removed for you.
  • Use Image to Base64 to go the other way.

Limitations

  • Only images are decoded; other files (PDFs, fonts) are reported as not an image.

Runs in your browser. Decoding happens in your browser - the data is never uploaded.

Frequently asked questions

How do I convert Base64 to an image?+

Paste the Base64 text (with or without the data:image/... prefix) and click "Decode image". The picture appears, and Download saves it as a normal image file.

How can I tell what kind of image Base64 contains?+

The first decoded bytes identify the format - PNG files start with 89 50 4E 47, JPG with FF D8 FF and so on. The tool reads them and shows the real format.

Why is Base64 used for images?+

It turns binary image data into plain text, so small images can be embedded directly in HTML, CSS, JSON or emails without separate files.