Base64 or data URI
Decoded image
Your decoded image appears here
Going the other way? Use the image to Base64 converter

About the Base64 to Image Converter

What is this tool?

Somewhere in a stylesheet, a database column or an API response you have found a wall of characters starting with something like iVBORw0KGgo, and you want to know what picture is hiding in it. Paste it here and you will see the image instantly, along with its dimensions, real format and decoded file size — then download it as a normal file or copy it straight to your clipboard.

The tool is deliberately forgiving about what you paste. A bare Base64 string, a full data URI, a CSS url() rule, or an entire img tag copied from HTML — all fine. Line breaks and spaces from email or code formatting are stripped automatically, the base64url variant is handled, and missing padding is repaired. Best of all, the format is detected from the decoded bytes themselves (the magic numbers), not from the header — so a string labeled PNG that actually contains a JPEG is identified correctly, and you are told about the mismatch. Everything runs in your browser; nothing you paste is sent anywhere.

How to Use This Tool

  1. Paste your string. Any shape works: raw Base64, a data URI, CSS, or an img tag. The preview updates as you type.
  2. Check the details. The chips under the preview show the dimensions, the detected format, the decoded file size and the Base64 length.
  3. Save the image. Download it with the correct file extension for its real format, or copy it to the clipboard to paste into an editor or chat.

Common Use Cases

Where mystery Base64 strings usually come from:

  • Debugging stylesheets: see what that inlined background-image in the CSS you inherited actually looks like.
  • Database contents: image blobs stored as Base64 text in a column become viewable without writing any code.
  • API responses: many APIs return thumbnails, QR codes or captchas as Base64 fields.
  • Email templates: extract the original logo or button graphic from an inlined email.
  • Related tools: create strings with the image to Base64 converter, or decode plain text with the Base64 encoder/decoder.

Frequently Asked Questions

How do I convert Base64 to an image?

Paste the Base64 string into the input box and the image appears in the preview immediately — no button to press. Then click Download image to save it as a file with the correct extension, or Copy image to put it on your clipboard. The whole conversion happens inside your browser.

Why is my image not showing?

The usual cause is an incomplete string: Base64 is long, and cutting off even the tail corrupts the image. Make sure you copied all of it. This tool already fixes the other common problems for you — line breaks, spaces, missing padding and a missing data URI header are all handled automatically. If it still fails, the error message will tell you whether the text is not Base64 at all or decodes to something that is not an image.

What image formats can it decode?

PNG, JPEG, GIF, WebP, BMP, ICO, AVIF and SVG. The format is identified from the magic numbers in the decoded bytes rather than from the header text, so it works even when the header is missing or wrong.

Can I paste a CSS rule or an img tag instead of the bare string?

Yes. The tool unwraps url(...) from CSS and src=... from a pasted img tag automatically, then decodes whatever is inside. That saves you from carefully selecting just the Base64 part out of a long line of code.

What if my string has no data:image header?

Not a problem. The tool decodes the raw Base64 and reads the file signature from the first bytes to work out the real format — the same way a file manager identifies a file without its extension. Headerless strings copied from databases or JSON fields work fine.

What does the header mismatch warning mean?

It appears when the data URI header claims one format but the decoded bytes are actually another — for example a string labeled data:image/png that really contains JPEG data. Browsers usually render it anyway, so the mistake goes unnoticed. The tool trusts the bytes, and the download uses the correct extension for the real format.

Is my data sent to a server?

No. Decoding happens entirely in your browser with JavaScript. Nothing you paste is uploaded, logged or stored, so strings from internal systems and private databases are safe to inspect here.

What is Base64?

Base64 is an encoding that represents binary data using 64 text characters, so files can travel through systems built for text: source code, JSON, databases and email. It is not compression or encryption — the image bytes are all still there, just written out as text, about 33 percent longer than the original file.