OmniTools
imageDifficulty: 2/5

Base64 to Image Converter

Decode a Base64 string or data URL back to an image, preview it, and download the file, with the real format verified from its bytes.

Decoded in your browser: The Base64 string is decoded locally, on a canvas in your browser. The data never leaves the tab — nothing is uploaded to any server, and analytics records only the format and size, never the content. Whitespace and line breaks in the pasted string are tolerated because Base64 is often wrapped at 76 characters by email and PEM tooling.

How it works

  1. Paste a bare Base64 string or a full data: URL — either form is accepted, and wrapping whitespace is ignored.
  2. The payload is decoded and verified by its magic bytes: the real format wins over any declared type, and the size and dimensions are reported.
  3. Preview the image when it is safe to do so (never for SVG), then download it with the correct file extension.
Privacy & Processing: Everything runs in your browser. Nothing you enter is uploaded, stored, or sent to analytics.

Frequently Asked Questions

What input does it accept?

A full data URL, or a bare Base64 string with no prefix. Whitespace and line wrapping are tolerated, and the URL-safe alphabet is accepted as well as the standard one.

Is the declared MIME type trusted?

No. A data URL’s media type is just text that whoever produced it chose. Every payload is re-checked against its magic bytes, the sniffed format wins, and any disagreement is reported. Non-image types such as text/html are refused outright rather than passed through to a preview or a download.

Why will it not preview an SVG?

Because SVG is a document format, not just pixels: it can contain scripts, event handlers and external references. It is decoded and offered for download with a clear warning, but it is not rendered here. Never inline SVG you did not write into a page.

What if the string is corrupt?

You get a specific message — invalid Base64, an empty payload, an unrecognised format, or a non-image type — instead of a broken image icon.

Related Tools