Base64 to Image

Base64 guide

How to Convert Base64 to Image Online

Base64 image strings are common in APIs, JSON payloads, email templates, CSS files and quick prototypes. This guide explains how to turn a Base64 string back into a real image, preview it, and download it safely.

5 min readBrowser-basedPNG ยท JPG ยท WebP ยท SVG

What is a Base64 image?

A Base64 image is binary image data represented as text. Instead of uploading a separate file, the image can be embedded inside HTML, CSS, JSON or another text-based format.

A typical data URL starts with a MIME type and then the encoded content:

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...

The prefix tells the browser what type of image it is. The long text after base64, is the encoded image content.

How to convert Base64 to an image

Paste the Base64 stringUse the full data URL or only the Base64 part. The tool can detect common image formats automatically.
Decode and previewThe image is generated inside your browser, so you can check the result before saving it.
Download the fileSave the decoded image as PNG, JPG, WebP, SVG or another supported format when available.

When should you use Base64 images?

  • Testing image responses from APIs.
  • Debugging JSON fields that contain image data.
  • Embedding small icons directly in HTML or CSS.
  • Checking whether a Base64 string is valid image data.
  • Recovering an image from logs, database fields or copied snippets.

Common problems

The string is incomplete

If the Base64 string was copied from a log or shortened by a UI, the image will not decode correctly. Make sure the full string is copied.

The MIME type is missing

Many tools can still detect PNG, JPG, GIF, SVG, WebP and other formats, but adding the correct prefix helps browsers understand the image immediately.

The file is too large

Base64 text is larger than the original binary file. Very large images can be slow to paste, render or copy.

Try it now

Paste your Base64 string and convert it into an image directly in your browser.

Open Base64 to Image Tool