Base64 to Image

Paste a Base64 string or a full data URI into the box and this tool decodes it back into a real image, ready to preview and download with the correct file extension.

Drop images here or click to browse

Most image formats up to 50 MB each

Your images never leave your device

Most image formats, up to 50 megabytes each Your images never leave your device

How to use the Base64 to Image

  1. Paste your Base64 text or data URI into the box.
  2. Check the preview and detected format.
  3. Download the decoded image.

Features

  • Accepts a raw Base64 string or a full data URI with the data:image prefix.
  • Detects the image format automatically from the data itself.
  • Shows dimensions and file size before you download.
  • Handles large strings without freezing the page.

What if I only have the Base64 text, not a data URI?

That is fine. Paste the raw Base64 string on its own, without the data:image/png;base64, prefix, and the tool detects the image format by reading the decoded file's own magic bytes rather than relying on a prefix that is not there.

Where does a Base64 image string usually come from?

Common sources include an API response that returns image data as text rather than a file, a database field storing an image inline, a piece of exported code from a design tool, or an email's embedded image source. Any of these can be pasted straight into this tool to get back a real, downloadable image file rather than a block of text.

Does the tool care about extra whitespace or line breaks in the pasted text?

No. Base64 text copied from code, a terminal or a log file often picks up extra line breaks or spaces along the way, and a small number of systems use a URL safe variant of the Base64 alphabet instead of the standard one, swapping a couple of characters that would otherwise break a strict decoder. This tool tolerates both, so a string that looks slightly mangled from wherever you copied it still decodes correctly.

Frequently asked questions

What formats can this detect?

JPEG, PNG, WebP, GIF and BMP are detected automatically from the decoded data.

Is there a size limit?

Very large Base64 strings, around 20 MB or more, decode in chunks so the page stays responsive rather than freezing.

Does pasting my Base64 text send it anywhere?

No, decoding happens entirely in your browser with JavaScript's own Base64 functions.

What happens if I paste text that is not valid Base64?

The tool reports that it could not decode the text rather than producing a broken or blank image file.

Can I see the image dimensions before downloading?

Yes, once the text decodes successfully, the preview shows the image alongside its detected format, pixel dimensions and file size.

Does the downloaded file get the correct extension automatically?

Yes, the file extension matches the format detected from the decoded data itself, for example .png or .jpg, not a generic or incorrect extension.