Paste a Base64 string — with or without the data:image/png;base64, prefix — to see the image and download it as a real file. The format is detected from the bytes, so the extension is right even if the prefix was wrong or missing.
Data URIs and bare Base64
A data URI looks like
data:image/png;base64,iVBORw0KGgo…. Everything before the comma is a declaration of what follows; everything after is the Base64. Both forms are accepted, and the declared type is ignored in favour of the actual magic bytes — because a surprising number of data URIs in the wild claim to be one format and contain another.Which formats are recognised
PNG, JPEG, GIF, WebP, AVIF, BMP, ICO and SVG. SVG is a special case: it is text rather than binary, so a Base64-encoded SVG decodes to markup and is previewed as an image. Anything unrecognised is offered as a raw
.bin download rather than being guessed at.Where these strings come from
Usually a CSS file, an HTML
<img src>, an API that returns images inline, or an email's MIME parts. Inlining an image avoids a network request at the cost of about a third more bytes and no caching, which is why it is used for small icons and almost never for photographs.Other names for this
Also searched as “base64 to png”, “base64 to jpg”, “decode base64 image”.
Questions
- Do I need to include the data: prefix?
- No. It is accepted if present and ignored — the real format is read from the decoded bytes.
- Nothing appears in the preview.
- The decoded bytes are not a recognised image format. Check the string is complete — a truncated paste is the usual cause.
- Does my text leave the browser?
- No. Everything runs as JavaScript in this tab — there is no server involved and no request is made. Open the Network panel and watch, or turn your Wi-Fi off and keep using the tool.