Base64 to Image Decoder

Paste a Base64 string — with or without the data:image/...;base64, prefix — to preview the decoded image and download it as a file. The decoding happens entirely in your browser; nothing is sent anywhere.

A data: prefix in your input overrides this.
Paste a Base64 string or data URI, then press Decode image.

What a data URI is

A Base64 image is binary picture data encoded as text so it can live inside HTML or CSS. The full form is a data URI: data:image/png;base64, followed by the Base64 payload. This decoder reverses that — it rebuilds the binary and shows the picture.

data:<mime>;base64,<payload> image

If your string already starts with data:, the decoder reads the MIME type from it. If you paste only the raw payload, pick the matching MIME type from the dropdown so the browser knows how to render it.

Worked example

The shortest valid PNG starts iVBORw0KGgo…. To decode it:

Paste: the payload, or the full data:image/png;base64,iVBOR….
Decode: the browser turns the text back into a PNG and renders it.
Download: save the rebuilt file — pixel-identical to the original.

Formats and privacy

PNG, JPEG, GIF, WebP and SVG all decode. Because Base64 is exact, the decoded file is byte-for-byte identical to the image that was encoded — no quality is lost. The whole process uses your browser's built-in decoder, so the data never leaves your device. If the preview is blank, the string is usually truncated or the MIME type is wrong.

Tip: going the other way? Use the image to Base64 converter. For plain text, try the Base64 encoder / decoder.

Frequently asked questions

Do I need the data: prefix?

No. If the prefix is present the decoder reads the MIME type from it; if you paste only the raw Base64 payload, choose the matching type from the dropdown so the image renders correctly.

Is the decoded image identical?

Yes. Base64 is a lossless, reversible encoding, so the rebuilt file is byte-for-byte the same as the original image — there is no quality loss.

Why is the preview blank?

Usually the string is incomplete (copy-paste cut it off) or the selected MIME type does not match the data. Re-copy the full string and pick the right type.

Is my data uploaded?

No. Decoding uses your browser's built-in image decoder and the FileReader/Blob APIs locally. Nothing you paste is sent to a server.

MB
Mustafa Bilgic · Editor, Calcool
Rebuilds the image from a data URI using a Blob and object URL. Everything runs in your browser - nothing you enter is uploaded, logged or stored.

Related calculators