Base64 to Image Converter - PNG and JPG, Free

Paste your Base64 text and hit convert. The picture shows up right on the page, so you can check it is the right one before you save it. Then hit download.

Raw characters or a full data URI both work. Your browser does the decoding, so the string is never sent anywhere. It is free and there is no signup.

Convert Base64 to image with Pi7

How to Convert Base64 to Image

  1. Paste the string into the box above.
  2. Click Convert To Image. The preview appears underneath.
  3. Click Download Image to save it.

Tell the Format From the First Few Characters

Every image format has a signature at the start of the file, and that signature survives encoding. So you can read the format straight off the front of the string.

  1. iVBORw0KGgo - PNG
  2. /9j/ - JPEG
  3. R0lGOD - GIF
  4. UklGR - WebP
  5. PHN2Zy or PD94bWw - SVG

Handy when someone hands you a string with no context. It also tells you fast when the thing you were given is not an image at all.

Base64 to PNG, JPG and Other Formats

The decoder does not convert between formats. It gives you back exactly what was encoded. A PNG string returns a PNG, a JPEG string returns a JPEG.

The download is named with a .png extension, but the bytes are whatever the string held. If your string was a JPEG, rename the file to .jpg and it opens fine.

Nothing Leaves Your Browser

Other decoders post your string to a server and hand back a link to the result. This page does not. The text is turned into an image on your own machine and drawn straight into the page.

That matters when the string is a scanned document, an ID photo, or a screenshot from an internal system. No upload means no copy on someone else's disk.

When a Base64 to Image Preview Stays Blank

A blank preview almost always comes down to the string, not the tool.

  1. Cut off. Copying from a log or terminal often truncates. The length should divide by 4.
  2. Padding stripped. Add the trailing = signs back until it does.
  3. URL-safe encoding. Swap - and _ back to + and /.
  4. Wrong prefix. A string labelled image/png that actually holds JPEG bytes confuses some browsers. Strip the prefix and let the tool add the right one.

Making a String From a Picture

Need a string from a picture instead? PNG to Base64 gives you the data URI plus ready HTML and CSS snippets.

For documents, Base64 to PDF decodes to a downloadable PDF, and file to Base64 encodes any format at all.

Common Questions

How do I know if my string is a PNG or a JPG?

Read the first characters. iVBORw0KGgo is PNG, /9j/ is JPEG. The list above covers the rest.

Is my string uploaded anywhere?

No. Your browser decodes it and draws the image on the same page. Nothing is sent over the network.

Does decoding lose any quality?

No. Base64 is an encoding, not compression. You get back the exact bytes that went in, so the image is identical to the original.

Made With By Pi7