EIT easy-image-tools / Decode a Base64 string into an image

Decode a Base64 string into an image

Decodes a base64 string or data-uri back into an image. Paste the string on the left.

Nothing found — try another word.

01

Decode a Base64 string into an image

Nothing found — try another word.

This tool has no parameters — the result is ready as is.

Nothing found — try another word.

Preview
Source
Result
no result yet

Decode a Base64 string turns the text back into the image bytes it was made from — the PNG to Base64 encoder run backwards. Paste the string, the bytes are decoded in your browser and the picture appears beside the text field; whitespace and line breaks are ignored, and a complete data: URI works as well as the bare payload because the prefix is stripped first. What comes back is the picture, not the original file: the bytes are decoded to pixels and encoded again, so every pixel is identical while the file bytes are not guaranteed to match. Nothing is uploaded — pasted Base64 is often a credential rather than a photo.

  • Decoding runs entirely in your browser: nothing is sent to a server.
  • Accepts the bare payload or a full data: URI; whitespace and line breaks are ignored.
  • Reads whatever format the bytes describe — JPG and WebP payloads decode too.
  • The pixels match the original; the file bytes are not guaranteed to.
  • Free with no daily limit, no watermark and no account, also for commercial use.

How to use it

  1. Copy the Base64 string and paste it into the text field on the left; a full data: URI works too.
  2. The decoded picture appears in the result tile on the right.
  3. Save it from the Download button, as PNG or in another format.

Questions

Do I need the MIME type or the file name?

Neither. Paste the payload alone and it is decoded as it is; paste the whole data:image/png;base64,... value and the prefix is removed first. The PNG signature check on this site reads the first bytes if you want a yes or no before decoding.

Why is the downloaded file not identical to my original?

The string holds compressed bytes while the picture you see is decoded pixels, and saving encodes those pixels again. The pixels match; the bytes are not promised to.

Will it decode a Base64 string of a JPG or a WebP?

Yes. The decoder reads whatever format the bytes describe, so a JPG payload gives back the JPG picture. You can still save it as PNG.

Is my pasted string sent to a server?

No. It is decoded and discarded in your browser tab, and the page makes no request with it - which matters when the string is a secret rather than a picture.

Related tools