Tools

Home
JSON FormatterSQL FormatterJS ValidatorMinify CSS
Merge PDFCompress PDFImage to PDF
JPG to PNGPNG to WebPCrop Image

Base64 Decode Png

Paste a Base64-encoded PNG string, decode it, preview the image, and download the resulting PNG file.

Your files never leave your browser

Decoded PNG Image

Decoded PNG

Paste a Base64 string and turn it back into a viewable PNG with dimensions, file size, and a one-click download. Works with raw Base64 or strings that include the data:image/png;base64, prefix — no manual stripping needed. And everything runs in your browser. Nothing gets uploaded.

How It Works

Paste Base64 String
→
Decode Binary Data
→
Render PNG Image

Your browser reads the Base64 text and converts each character group back into binary bytes using JavaScript's built-in atob() function. Those bytes form a valid PNG file, which then gets rendered as a preview image. No server round-trip, no API call — just local decoding that works even offline.

Examples

Decoding a Tiny 1×1 Pixel Tracker

You're debugging an email template and find a Base64-encoded tracking pixel embedded in the HTML.

INPUT
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQI12NgAAIABQABNjN9GQAAAAlwSFlzAAAWJQ...
OUTPUT
1×1 transparent PNG (68 bytes)

Restoring an Icon from a CSS Data URI

A stylesheet has a background-image set as a data URI. You want to see the actual icon and save it as a file for the design team.

INPUT
Base64 string from background-image: url(data:image/png;base64,...)
OUTPUT
24×24 PNG icon, downloadable as decoded.png

Checking an API Response That Returns Base64 Images

Your backend generates thumbnails and returns them as Base64 in a JSON payload. QA wants to verify the output actually looks correct before approving the ticket. They don't want to write code — they just want to see the picture.

INPUT
Raw Base64 thumbnail string from JSON response (no prefix)
OUTPUT
150×150 PNG thumbnail with visible preview + download button

Who Uses This

👨‍💻 Developers

Debugging API responses that return images as Base64 strings instead of URLs.

🔌 QA Engineers

Quickly verifying that generated thumbnails and avatars match expected output.

🎨 Email Designers

Extracting inline images from HTML email templates to edit them separately.

📚 Students

Learning how Base64 encoding works by seeing the decode process happen live.

Common Mistakes

Pasting a JPEG string and expecting PNG output

If your Base64 starts with /9j/, that's a JPEG — not a PNG. PNGs start with iVBORw0KGgo. Use a JPEG decoder for JPEG data, or the tool won't render it correctly.

Copying only part of the Base64 string

Base64 strings for images are often thousands of characters long. If you accidentally cut it short, the decoder gets corrupted data and either shows nothing or a broken image. Double-check you grabbed the whole string, including any trailing = padding.

Including line breaks or extra whitespace

Some systems split Base64 across multiple lines (email headers, PEM files). If you paste it with line breaks still in there, decoding can fail. Strip the newlines first, or paste the whole thing on one line.

Technical Details

Frequently Asked Questions

How do I decode a Base64 string to a PNG image?

Paste the Base64 string into the text box and hit Decode. The tool converts the characters back to binary data and renders the PNG. You can then preview it and download the file. No software to install.

Is it safe to decode Base64 images online?

With this tool, yes. The decoding happens entirely in your browser — your Base64 string is never sent to a server. You can even disconnect from the internet after the page loads and it will still work fine.

What if my Base64 string includes the data URI prefix?

No problem. The decoder automatically detects and strips the data:image/png;base64, prefix before processing. Paste it with or without — both work.

Can I decode Base64 to JPEG or other formats with this tool?

This tool is built specifically for PNG. If your Base64 encodes a JPEG, the binary data is structured differently and you'd need a Base64-to-JPEG decoder. Check the related tools section below for other format options.

Why does my decoded image look broken or blank?

Usually this means the string got truncated during copy-paste. Base64 for even a small image can be hundreds of characters. Make sure you copied the entire string. Also check that it is actually a PNG — JPEG Base64 starts with /9j/ while PNG starts with iVBORw0KGgo.

Share: