belun.app Blog

Base64 to Image Converter — Decode and Download Free

Paste a Base64 string or a full data:image/... URI and the picture appears right away. The tool detects the real format from the decoded bytes — PNG, JPG, GIF, WebP, AVIF, BMP, ICO, or SVG — and lets you save it, optionally re-encoded as PNG or JPG. Nothing is uploaded; the decoding happens in your browser tab.

How it works

  1. 1
    Paste your Base64 Drop the string into the text box. A full data:image/png;base64,... URI works, and so does the bare payload on its own. CSS url(...) wrappers and stray quotes are stripped automatically.
  2. 2
    Check the preview The image renders below the box along with its detected format, decoded file size, and pixel dimensions. If the string is not an image, you get a plain explanation instead of a broken icon.
  3. 3
    Download it Keep the original format, or switch to PNG or JPG to re-encode through a canvas. Click Download and the file lands in your downloads folder.

Your data stays private

All processing happens entirely in your browser. No files, text, or data are ever sent to our servers. You can disconnect from the internet and this tool will still work.

Frequently asked questions

Do I need the data:image prefix?
No. Paste the raw Base64 payload and the tool identifies the format from the decoded magic bytes, then builds the correct data URI for you. If you do include a prefix, it is parsed and used as a fallback hint.
Which image formats are supported?
PNG, JPEG, GIF, WebP, AVIF, HEIC, BMP, ICO, and SVG. Format detection reads the actual file signature rather than trusting the MIME type in the prefix, so a mislabelled string still decodes correctly.
Is my Base64 string uploaded anywhere?
No. Decoding, format sniffing, preview, and re-encoding all happen in JavaScript inside your browser. The string never leaves your device, so it is safe for internal assets, signed images, and client work.
Why does my string fail to decode?
The usual culprits are a truncated copy, HTML entities like + instead of +, or leftover markup such as a closing quote. The tool tells you when it finds a character outside the Base64 alphabet so you can spot the damage.
Can I convert a Base64 PNG to JPG?
Yes. Pick JPG in the download row and the image is redrawn onto a canvas with a white background — JPEG has no alpha channel, so transparency would otherwise turn black — then encoded at quality 0.92.
Does URL-safe Base64 work?
Yes. Strings that use - and _ in place of + and / are decoded the same way, and missing padding at the end is tolerated.

From the blog

How to Decode a Base64 Image String (and When Not to Use One) What a Base64 image string actually contains, how to turn it back into a file, and the size trade-off nobody mentions. Read the post →

Related tools