---
title: "Base64 to Image Converter – Decode a Data URI, Free"
description: "Paste Base64 text or a data URI and see the picture it holds, with its real type and size, then download it as a PNG, JPG, GIF, WebP or SVG file. Free."
url: "https://imagecompressor.si/base64-to-image"
lang: "en"
---

# Convert Base64 to an image

Paste the text, see the picture straight away, and save it as an ordinary file.

## How it works

1. **Add your images** Drag and drop, paste, or pick files. They upload over an encrypted connection.
2. **Pick a quality or a target size** Use the quality slider, or tell it exactly how many KB or MB you need.
3. **Download** Save each file, or grab them all at once as a ZIP.

Base64 pictures turn up in many places: inside HTML and CSS, in API responses, in exported JSON, in email source and in log files. Reading what one shows by eye is impossible, and saving it as a file usually means writing a small script. Paste it here instead and the picture appears below, with a button to download it.

Both forms work: a full data URI that starts with data:image/png;base64, and bare Base64 without the prefix. The type is read from the first bytes of the picture itself, not from what the text claims, so a mislabelled data URI still downloads with the right extension. Line breaks and spaces inside the text are ignored.

Nothing is sent to a server: the text becomes bytes in your browser and the picture is shown from them.

## Which pictures it recognises

PNG, JPEG, GIF, WebP, AVIF, BMP, ICO and SVG. If the text is valid Base64 of something else, a PDF or a font for example, the page says it does not recognise a picture rather than showing a broken image.

If the text still has quotation marks or commas at either end, remove them before pasting, as they are not part of the encoded data.

## Finding the Base64 in code

In HTML it sits in a src attribute after data:image; in CSS inside url(); in JSON often in a field named data, image or content. Copy from just after the opening quote to just before the closing one. Long values are fine; the box takes text of any length.

## After decoding

The downloaded file is the picture exactly as it was encoded. To make it smaller, convert it, or put it to use on a web page as a normal file, open it with the compressor or one of the converters.

The decoded picture is ready to download or edit further.

## Checking what an API sent

Developers often need to see what a service actually returned: a thumbnail from a camera, a chart from a reporting API, a captcha, a signature captured on a tablet. Pasting the field here shows it at once, together with the real format and size, which helps when the picture looks wrong in the app that receives it.

If the picture is cut off at the bottom, the text was probably truncated by a log or a column limit; copy it from the source rather than from a shortened view.

## Frequently asked questions

### Is the text uploaded?

No. It is decoded in your browser and nothing leaves the page.

### Why does it say my text is not a picture?

Either it is not complete Base64, often because a few characters were cut off when copying, or it holds a file that is not a picture.

### Can I decode several at once?

One at a time: paste the next one in place of the first.

### Is SVG safe to view?

Yes. It is shown as a picture, which browsers draw without running any script inside it.

### Can I turn a picture into Base64?

Yes, with the image to Base64 page, which also gives HTML and CSS snippets.

### Is there a length limit?

No fixed limit, though very large pictures take a moment to appear.

### Why did my JPEG download as PNG?

The file type is read from the picture's own bytes. If they say PNG, the picture is a PNG, whatever the data URI claimed.

## Related tools

- [Convert an image to Base64](https://imagecompressor.si/image-to-base64): Get a data URI, an HTML tag and a CSS line for your image, ready to paste into code or an email template.
- [Convert PNG to JPG](https://imagecompressor.si/png-to-jpg): Get a smaller file for photos, with transparent areas filled white.
- [Compress a JPEG](https://imagecompressor.si/compress-jpeg): Reduce JPEG file size while keeping the photo looking right, free and with no sign-up.
