DECODE

Base64 to Image

Paste the string, see the picture, download the file — with the right extension, taken from the bytes themselves.

DECODE

☞ runs entirely in your browser — nothing is uploaded

Decoded image

Paste a base64 string or a data: URI to see the image here.

back to a file

Turn the string back into a picture

Base64 is how an image travels through places that only carry text: a CSS file, a JSON payload, an email body, a database column. Getting the picture back means decoding those characters into bytes and handing you a real file, which is all this page does.

Paste the raw string or the whole data: URI — the prefix, line breaks, surrounding quotes and even an entire <img> tag are all fine, because everything outside the base64 alphabet is dropped before decoding.

three steps

How to decode base64 to an image

01

Paste anything that contains the string

A bare base64 blob, a data: URI, or a line copied straight out of a stylesheet or a JSON response. Whitespace and quotes are ignored, and URL-safe base64 with - and _ instead of + and / is accepted too.

02

Check the preview

The image appears as soon as the bytes are valid. If it does not, the string is usually truncated — a copy that stopped short decodes into bytes that are no longer a readable file.

03

Download with the right extension

The type comes from the file's own magic bytes, not from the data: prefix. When the two disagree — which happens whenever a prefix was copied from somewhere else — the bytes win, and the page tells you so.

quick answers

Base64 decoding FAQ

Do I need the data:image/png;base64, part?

No. It is accepted and read, but the actual file type is detected from the decoded bytes. A bare base64 string works exactly as well.

Which formats can it recognise?

PNG, JPG, GIF, WebP, BMP, ICO and SVG. The first six are identified by their magic bytes; SVG is text, so it is recognised by its opening tag.

The prefix says PNG but you saved a JPG. Why?

Because the bytes are a JPEG. A mismatched prefix is usually a copy-paste leftover, and saving those bytes as .png would give you a file that no viewer opens. The page shows a note whenever the two disagree.

Nothing appears when I paste. What is wrong?

Almost always a truncated string — copied from a console or an editor that cut it off. Check that the end of what you pasted matches the end of the original, including any trailing = signs.

Is my data uploaded?

No. The string is decoded in your browser and the file is built locally, so a screenshot embedded in an internal document never leaves the machine.

Is there a size limit?

Only what your browser can hold in memory. Base64 is about a third larger than the file it encodes, so a very large string is heavy to paste long before it is heavy to decode.

How do I go the other way?

Use the image to base64 tool, which produces both the raw string and a ready-made data: URI.

Is this free?

Yes — free with no watermark.