ImageNew

Base64 to Image

Convert Base64 strings back to downloadable images

100% client-side — your data never leaves your browserNo data stored or uploadedFree for lifetime · No signup

What does a Base64 to image converter do?

Base64 is a text encoding — it turns binary image bytes into a string made of letters, digits, and a few symbols so images can travel through channels that only handle text: JSON payloads, CSS background-image declarations, embedded data URIs, or a database column. This tool reverses that: paste a Base64 string or a full data:image/...;base64,... URI and it decodes the bytes back into a real image you can preview and download as a file.

It auto-detects the format when you paste a raw Base64 string without the data: prefix, by checking the first few characters against known magic-byte signatures — /9j/ for JPEG, iVBOR for PNG, R0lGOD for GIF, UklGR for WebP. If none match it falls back to PNG, so if the downloaded file won't open, the source format was probably misdetected.

When to use it

This is the mirror image of Image to Base64: use it when you've received or extracted a Base64 blob — from an API response, a browser devtools inspection, an email attachment encoded inline, or a CSS file — and you need the actual image file back, not just a preview in code. It's also useful for sanity-checking that a Base64 string you generated elsewhere actually decodes to the image you expect, before you ship it embedded in an app or document.

If you're going the other direction — you have an image file and need Base64 text — use Image to Base64 instead. The two tools are complementary halves of the same encode/decode round trip.

Example

Paste data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA... and hit Convert — the decoded image renders immediately against a checkerboard background (so you can see transparency), and Download saves it as image.png, with the extension inferred from the data URI's declared MIME type. If you paste a raw base64 string with no data: prefix, the tool inspects the leading characters to guess PNG, JPEG, GIF, or WebP before rendering.

How to use the Base64 to Image tool

  1. 1

    Paste the Base64 string

    Either a full data:image/...;base64,... URI or a raw base64 blob with no prefix.

  2. 2

    Click Convert

    The tool auto-detects the image format from the data URI or the string's magic bytes and renders a preview.

  3. 3

    Check for errors

    If the string isn't valid image data, an error message replaces the preview instead of a broken image.

  4. 4

    Download the file

    Saves the decoded bytes as an actual image file with the correct extension.

Frequently asked questions

Is my data uploaded anywhere?

No. Decoding happens entirely in your browser by assigning the data URI to an <img> element — nothing you paste is sent to a server.

Why does my downloaded image look corrupted or won't open?

This usually means the format auto-detection guessed wrong, most often because the Base64 string was truncated when copied, or it lacked a data: prefix and didn't match any known magic-byte signature (in which case it defaults to PNG).

What image formats are supported?

PNG, JPEG, GIF, and WebP are auto-detected from the data URI or magic bytes. Any other format works too as long as you supply the correct data:image/<type>;base64, prefix yourself.

How is this different from Image to Base64?

This tool decodes Base64 text back into an image file. Image to Base64 does the reverse — it encodes an uploaded image file into Base64 text you can embed in code.

Get the next tool before you need it

One email a week: new and trending developer tools, fresh comparisons, and what shipped. Unsubscribe in one click.