Pular para o conteúdo
Tool

Base64 for Image

Paste a Base64 string to view the decoded image on the fly and download the original file.

Base64 to image

Paste a Base64-encoded string to preview and download the matching image file

Visual previewBase64 IMG

Paste a valid Base64 string on the side to see the preview here.

What it is

The Base64 to Image Decoder does the opposite of encoding: you paste a base64 string and it gives you back the picture as a real file you can view and save.

It is the tool you reach for when you find an image buried inside code and need to see what it actually is: a data: URI in a stylesheet, a field in a JSON payload, an attachment inside a raw email, or a response from an API that returns pictures as text.

How to use it

  1. Paste the base64 string into the box. A full data:image/png;base64,... URI works, and so does the bare string on its own.
  2. See the preview appear immediately.
  3. Download the file, which is saved with the right extension for whatever the data turned out to be.

What can go wrong

Three problems account for almost every failed decode.

The string was cut short. Base64 copied out of a terminal or a log is often truncated. If the preview is blank or only the top of the image renders, the string is incomplete.

Line breaks got in the way. Some sources wrap base64 every 76 characters. The decoder here ignores whitespace, so this usually just works, but a string that was reformatted by hand can lose characters along the way.

It was never an image. Base64 can carry any file at all: a PDF, a font, a zip. If the decode succeeds but nothing renders, the data probably is not a picture.

Where the data goes

Nowhere. The decoding happens in your browser, so whatever you paste stays on your device. That matters here more than in most tools, because base64 blobs from logs and API responses often carry things you would rather not hand to a stranger.

To go the other way, use the image to base64 converter.

Frequently asked questions

My base64 string will not decode. Why?

Almost always one of three things: the string was truncated when it was copied, it was reformatted by hand and lost characters, or the data was never an image in the first place. Base64 can carry any file type.

Do I need to include the "data:image/png;base64," part?

No. The decoder accepts a full data URI or the bare base64 string on its own, and works out the file type from the data itself.

Is what I paste sent anywhere?

No. The decoding runs in your browser and the data stays on your device. That matters here, because base64 pulled from logs and API responses often carries sensitive content.

What file will I get?

Whatever the data actually is. The download is saved with the matching extension, so a PNG comes back as .png and a JPEG as .jpg.

About this content

Written by:
Ferramenta Grátis

Related tools