Skip to main content

Base64 to Image Converter Online Free

Decode Base64 strings and data URIs into downloadable image files instantly. View dimensions and formats directly in your browser with 100% privacy.

100% private. Nothing is uploaded.

The string you paste is decoded in your browser, never uploadedSee the format, dimensions and estimated size before you downloadTakes a full data URI or raw Base64, detects PNG, GIF, WebP or SVG, and treats anything else as JPG

How to Convert Base64 to an Image in 3 Steps

  1. Paste Your Base64

    Paste a full data URI (data:image/…;base64,…) or a raw Base64 string into the box. Spaces and line breaks in a raw string are removed for you.

  2. Decode & Preview

    Click Decode & Preview Image. You see the image with its format, dimensions and estimated size.

  3. Download the Image

    Click Download Image to save it as a file. The extension comes from the image type, such as .png or .jpg.

Key features

Base64 to image from a data URI or raw string: both pasted strings decode to the same PNG picture

Paste Base64 or a Data URI

Base64 to image preview: the decoded picture with 1200 × 800 rulers, its PNG format and its size in KB

Preview, Size and Dimensions

  • Data Stays on Your Device
  • PNG, JPG, GIF, WebP, SVG
  • Free, No Account Needed

When You Need to Decode a Base64 Image

Debugging & Development

  • Preview Base64 images from API responses without writing code
  • Save images returned by AI image generation APIs as files
  • Check Base64 image data stored in database records
  • Look at data URIs found in CSS or HTML source

Data Recovery

  • Pull images out of Base64 fields in JSON payloads
  • Recover images logged as Base64 strings in app logs
  • Decode Base64 image attachments copied from raw email source
  • Turn Base64 values from a database export back into image files

Testing & QA

  • Check that an encoding function produces the right image
  • Confirm that Base64 strings in config files are valid images
  • Check the size and dimensions of images an API returns
  • Test canvas.toDataURL() output by viewing the image it makes

What Is a Base64 Image Decoder?

A Base64 image decoder turns a Base64 text string back into the image file it came from. It rebuilds the original bytes from the text and shows the picture. It is the reverse of encoding an image to Base64. Decoding does not change the image's format, size or quality.

How to View a Base64 Image and Save It

These answers cover how to spot a Base64 image's format, how to show it in a web page, and what the downloaded file contains.

How Can You Tell a Base64 Image's Format?

Look at the first few characters. Every format starts its file with the same bytes, so its Base64 starts the same way too. With a raw string, the decoder reads these for you.

  • iVBORw0KGgo: PNG
  • /9j/: JPG
  • R0lGOD: GIF
  • UklGR: WebP
  • PHN2Zy or PD94bWw: SVG

How Do I Display a Base64 Image in HTML?

Put it in an img tag as a data URI. Add the prefix data:image/png;base64, before the string, using the type that matches the image. CSS works the same way inside url(). To make the string from an image file, use the image to Base64 converter.

What File Do You Get When You Download?

Download Image saves the decoded bytes as a file named decoded-image, with an extension such as .png, .jpg, .gif or .webp. The image is not re-encoded on the way. Its quality and any metadata stay exactly as they were before it became Base64.

Base64 to Image FAQ

Common questions about decoding Base64 strings to images

Can I paste a Base64 string without the data:image prefix?

Yes. The decoder reads the first bytes and adds the right prefix for PNG, GIF, WebP and SVG. Anything else is treated as JPG. For AVIF, BMP or ICO, paste the full data URI with its type, like data:image/avif;base64, so the download gets the right extension.

Why won't my Base64 string decode?

Most often the string is cut off, so copy all of it. Remove any quotes and JSON escapes, such as \/ in place of /. URL-encoded text (%2B, %2F) and URL-safe Base64 (- and _) must be changed back to + and / first. Also check that the data is an image and not a PDF or other file.

How do I check the size of a Base64 image?

Decode it. The tool shows the width and height in pixels and the estimated file size. The estimate uses the general rule that the file is about three quarters of the Base64 length, so 40,000 characters make a file of about 29 KB. There's no cap on how long the pasted string can be.

Can I decode Base64 from a JSON API response?

Yes. Copy the value between the quotes and paste it in. Many image generation APIs return images this way. If the JSON shows \/ instead of /, unescape it first, or the decode will fail.

Can I convert Base64 to a PDF or another file type?

No. This tool only decodes images that your browser can show. A Base64 PDF, ZIP or text file gives an error. Once you have the image, you can change its format with the image converter.

Which image formats are supported?

Any image your browser can show. JPG, PNG, GIF, WebP and SVG work in every modern browser, and AVIF, BMP and ICO work in most. Raw strings are detected as PNG, GIF, WebP or SVG, with JPG as the fallback. The download keeps the image's own format, since the tool doesn't convert it.

Still have questions? Contact our support team