Skip to content

Base64 to Image

Decodes a Base64 string or data URI back into a viewable, downloadable image.

A data URI that arrived through a stylesheet, a JSON payload and a chat client is rarely clean: it has a url() wrapper, quotes, line breaks, or the data: prefix missing. This accepts all of that, decodes it, and tells you when the header is lying about the type.

🔒 Runs entirely in your browserbase64decodedata-uri

Paste the data URI

A url(…) wrapper, surrounding quotes, stray line breaks and a missing data: prefix are all accepted — that is how these arrive after a trip through a stylesheet, a JSON file and a chat client.

How to use it

  1. Paste whatever you have

    The whole data: string, or just the Base64 part. Wrappers, quotes and stray line breaks are stripped.

  2. Check the type against the claim

    The bytes are the authority. If the URI says image/png and the bytes are a JPEG, the row says so — that mismatch is the usual reason such an image will not render where it is used.

  3. Download it as a file

    The extension follows the sniffed type rather than the header, so the file you get opens.

Common questions

It says the Base64 is malformed.

Almost always a truncated copy-paste. A data URI is one very long line, and terminals, chat clients and log viewers cut it. Copy it from the source file rather than from a rendered view.

The size shows as unknown.

The dimensions come from decoding the image, and SVG in particular does not go through that path on every engine. The image still previews and downloads correctly.

Is my image sent anywhere?

No. Decoding is `atob` and a Blob, both in this tab. Nothing is posted, which matters here because a pasted data URI is often something out of a private document.

Feed it from

Next

These accept what this tool produces, so the result can go straight in.