Base64 to Image

Base64 to Image

Paste a base64 string, with or without a data-URL prefix, to preview the image and download it as a PNG.

Decoded image preview

About the Base64 To Image

Sometimes an image does not exist as a file at all. It lives as a long string of encoded text inside an API response, a database field, a log file or a data URI in code. This tool turns that string back into a picture you can see and save.

Paste the Base64 string and the tool decodes it in your browser, showing a live preview with the detected format, the dimensions in pixels and the approximate file size. You can then download the image as a PNG file, ready to use.

Base64 is a lossless encoding, so decoding restores the exact original bytes. The picture you download is identical to the one that was encoded, with no loss of quality along the way.

Because the preview shows the format, the dimensions and the size before you download anything, you can spot a wrong string early instead of saving a broken file. If the string is truncated or was copied with a character missing, the tool tells you plainly rather than guessing, so you know to go back and copy the full value.

How to use

  1. Paste your Base64 string into the input box, with or without the data URI prefix at the start.
  2. Click Show Image to decode it and see the preview.
  3. Check the preview, the format, the dimensions and the file size shown underneath.
  4. Click Download PNG to save the image as a PNG file on your device.
  5. Click Clear to try another string.

Key features

  • Accepts raw Base64, full data URIs and the URL-safe variant, so strings copied from code and web addresses work as they are.
  • Detects the real format from the image bytes and shows the dimensions and approximate size.
  • Downloads the decoded picture as a PNG file with one click.
  • Warns you clearly if the string is not valid Base64 or does not decode to a readable image.
  • Decodes entirely in your browser, so the image is never uploaded to a server.
  • Checks that the data is really an image before showing it, instead of saving a broken file.

Common uses

People use this tool to recover pictures from API responses and database exports, to pull an image out of a log file or an email, to check what an encoded string in code actually contains, and to turn a data URI from a web page back into a file they can open and share. Developers also use it to check icons and thumbnails embedded in code, and to rescue an image from a page that only offers the encoded version.

Frequently asked questions

Which image formats does it support?

PNG, JPEG, GIF, WebP, BMP and SVG.

Is the decoded image identical to the original?

Yes — Base64 is lossless, so decoding restores the exact original bytes.

Why won't my string decode?

Common causes are a truncated string, missing padding, or characters outside the Base64 alphabet.

How do I turn a Base64 string into an image?

Paste the Base64 string into the input box and click Show Image. The tool decodes it in your browser and shows a preview with the detected format, dimensions and approximate size, and you can download it as a PNG file with Download PNG.

What is a data URI and can I paste the whole thing?

A data URI is a string that starts with data:image, followed by the format and the Base64 data, and it is often found in code, API responses and database fields. You can paste the full data URI and the tool reads the image from it.

Does the tool accept URL-safe Base64?

No. The tool accepts standard Base64 and full data URIs, but the URL-safe variant is rejected because it uses a different alphabet. Replace – with + and _ with / before you paste the string.

Can I copy the decoded image straight into another app?

No. The tool has no copy button, so use Download PNG to save the image as image.png, then insert that file into your document, chat or design app.

Is my image uploaded anywhere?

No. The string is decoded entirely in your browser, the image is never sent to a server, and you do not need an account to use the tool.

Free to use, no signup needed. This tool runs entirely in your browser — your data never leaves your device.