Utilo

Base64 to Image Converter – Free, Online, Private

Decode a Base64 image and preview it in the page. PNG, JPEG, GIF and WebP signatures are detected, and a data URL you already have is shown as-is.

Input
Output
Decoded preview

How to convert Base64 to Image

  1. Paste raw Base64 or a data:image URL. Whitespace and URL-safe characters are accepted.
  2. The page sniffs the bytes and builds a data URL.
  3. Check the preview, then copy the data URL into a fixture or an img src.

What is decoded

The input may be the raw alphabet or a full data URL. A data URL is returned unchanged so the media type you wrote is kept. Raw text is normalized: whitespace is stripped, URL-safe - and _ become + and /, and padding is added to a multiple of four. The bytes are then matched against PNG, JPEG, GIF and WebP signatures. If none match, the preview still uses image/png, which is the right guess for the one-pixel sample and the wrong guess for an unknown file. SVG that starts with < is labeled image/svg+xml. The preview is an img element pointing at that URL. Nothing is uploaded.

What this will not repair

A truncated string decodes to truncated bytes and the image fails to paint. The page does not guess missing characters. A string that is Base64 of a PDF or a zip is not an image; the preview stays blank and the data URL is still copied if you ask for it, so look at the preview before you trust the type. HEIC and AVIF are not sniffed. Rename the file or convert it in the image compressor first. Very large pastes use memory in the tab. A multi-megabyte photo is better dropped on the image-to-Base64 page as a file than pasted as text.

Worked example

The sample is a 1×1 PNG, the smallest valid file, encoded as Base64. The signature bytes are 89 50 4E 47, so the preview is a PNG data URL. It looks like a tiny transparent pixel, which is the point of the fixture: you can confirm the round trip without a real photo. Paste the data URL into the image-to-Base64 page and the raw alphabet comes back. If you add a data:image/png;base64, prefix yourself, this page keeps that prefix.

Where Base64 images show up

Email signatures, CSS backgrounds, canvas toDataURL output, and API fields named avatar_base64 all use this shape. Viewing one locally matters when the string might be a customer photo. The bytes stay in the tab. The full Base64 tool on Utilo also encodes files and speaks URL-safe alphabets; this page is the one that answers whether the string is a picture.

Frequently asked questions

Do I include the data: prefix?

Either way. A data:image URL is kept. Raw Base64 is wrapped with a sniffed media type.

Which formats are recognized?

PNG, JPEG, GIF, WebP and SVG-looking text. Anything else is previewed as PNG and may not paint.

Why is the sample almost invisible?

It is a 1×1 PNG. It proves the decode. Use your own image for a real preview.

Is the image uploaded?

No. Decoding and the preview stay in the browser.