Base64 to image

Convert Base64 to an Image

Paste a Base64 string or a full data: URI, preview the image, and download it as a file — free and right in your browser.

Paste & previewAuto-detects formatNo sign-up PNG · JPG · WebP · GIF · SVG

Turning Base64 back into a file

Base64 strings show up everywhere — in CSS, in API responses, in saved data URIs, in config files. When you have one and need the actual image, this decoder converts it back: paste the string (with or without the data: prefix), and it rebuilds the original file so you can preview and save it.

The decoder is forgiving. It strips a data: URI prefix, removes line breaks and stray whitespace, handles URL-safe Base64, and repairs missing padding automatically. It then checks the decoded bytes really are an image, so a wrong or corrupt paste fails with a clear message instead of saving a broken file.

How to convert Base64 to an image

  1. Paste your Base64. Drop the raw Base64 body or a full data:image/…;base64,… URI into the box on the Decode tab.
  2. Decode. Click Decode — the image appears instantly in a preview, with its detected type and size.
  3. Download. Save the decoded image to your device; the file gets the correct extension automatically.

With or without the prefix

You can paste a full data:image/png;base64,… URI or just the part after the comma — the tool handles both. It even detects the real format from the bytes, so the download is correct even if the prefix was missing or wrong.

More Base64 & data URI tools

常见问题

What can I paste?

Either a complete data: URI (data:image/png;base64,…) or just the raw Base64 body. Line breaks, quotes, and url() wrappers are stripped automatically.

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

The string decoded successfully but the bytes aren't a recognised image format — usually a copy/paste that lost characters, or Base64 of something that isn't an image. Re-copy the full string and try again.

What format will the downloaded file be?

The decoder sniffs the real format from the data (PNG, JPG, GIF, WebP, BMP, SVG, AVIF, or ICO) and gives the download the matching extension.

Where is my image processed?

The encoding and decoding happen in your browser, so the result is created on your own device. How any data associated with the tool is handled is described in our privacy policy.

更多图片工具