Base64 to Image

Turn a base64 string into a downloadable image

Result

Nothing to preview yet

What is the Base64 to Image tool?#

Base64 to Image turns a base64 string back into a viewable image. Paste a raw base64 string or a data URL, and the image appears in the preview panel, ready to download in its original format. The format is detected from the data itself, so there are no settings to choose.

Everything runs in your browser. The pasted text is decoded on your device and never sent to a server.

How to Use#

  1. Copy the base64 string or data URL of the image.
  2. Paste it into the input box.
  3. Check the preview and download the image with the Download button.

The input is processed as you type, so there is no convert button. Press the Clear button to reset the input and the preview together.

Supported Formats#

  • PNG: screenshots, diagrams, and images with transparency.
  • JPEG: photos and scanned images.
  • GIF: animations and simple graphics.
  • WEBP: a modern web format with good compression.
  • SVG: vector images stored as text.
  • BMP, ICO, AVIF: supported as well, including Windows icon files.

If the pasted text does not decode to a supported image, an error message is shown instead of a preview.

Example#

Paste the base64 below to get a small blue circle:

PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIj48Y2lyY2xlIGN4PSI1MCIgY3k9IjUwIiByPSI0MCIgZmlsbD0iIzNiODJmNiIvPjwvc3ZnPg==
100x100 blue circle

The same string with a data:image/svg+xml;base64, prefix works too.

Common Use Cases#

  • Restoring an image from base64 that was embedded in an HTML email, a JSON payload, or an API response.
  • Turning a data URL from a stylesheet or a prototype back into an image file.
  • Checking whether a base64 string actually contains an image.
  • Getting a downloadable file when all you have is the pasted code.

FAQ#

Notes#

SVG is a text format and can contain scripts. Only convert base64 strings from sources you trust.

  • Decoder

Last updated:

Related tools