Base64 to Image

Base64 to Image decodes a Base64 string — or a full data URI — back into a viewable image and lets you download it as a file. It detects the format automatically, so even raw Base64 without a prefix previews correctly.

Decoding happens entirely in your browser; nothing is uploaded. Paste a value, see the image, and save it with the right extension.

Paste a Base64 string or a full data:image/…;base64, URI to preview the image and download it. Everything runs locally in your browser.

Base64 / data URI input
Preview
The decoded image appears here.

How to use Base64 to Image

  1. 1

    Paste your Base64

    Drop in a raw Base64 string or a complete data:image/…;base64,… URI.

  2. 2

    Preview the image

    The decoded image renders immediately, with the detected MIME type shown below it.

  3. 3

    Download the file

    Click Download to save the image with the correct extension (.png, .jpg, .svg, …).

Raw Base64 vs a data URI

A data URI carries its own type, like `data:image/png;base64,…`, so the browser knows exactly how to render it. This tool uses that type directly when present.

When you paste raw Base64 with no prefix, the tool inspects the first few decoded bytes — the file's magic number — to identify PNG, JPEG, GIF, BMP, WebP or SVG, then assembles a matching data URI for the preview and download.

Verifying and saving the result

Previewing is the quickest way to confirm a Base64 payload is a valid image and was copied in full — a truncated string either fails to decode or renders as a broken image.

The download uses the detected type to pick a sensible filename and extension, so the saved file opens correctly in any image viewer.

Frequently asked questions

Do I need the data: prefix?
No. A full data URI works, and so does raw Base64 — the image type is detected from the decoded bytes when the prefix is missing.
Which formats can it detect?
PNG, JPEG, GIF, BMP, WebP and SVG are recognised from their signatures. Unknown types fall back to PNG.
Is my data uploaded?
No. Decoding and preview happen entirely in your browser.

Last updated: