Base64 to PNG Converter
Convert Base64 encoded strings to PNG images
Paste a Base64 encoded string — with or without the data:image/png;base64, prefix — and get a real PNG file you can save, share, or edit. Handy when APIs, email templates, or database exports hand you encoded image data instead of an actual file.
Hit convert and the decoded image shows up with a preview, dimensions, and file size. Download it as a standard PNG in one click. And everything runs in your browser. Nothing gets uploaded.
How It Works
Your browser's built-in atob() function decodes the Base64 characters back into binary pixel data. That data gets drawn onto an HTML canvas element, which then exports a standard PNG file. The whole thing takes under a second for most images — no waiting on server round trips.
Examples
Extracting an image from an API response
A REST API returned a user avatar as a Base64 string inside JSON. You need the actual PNG file to upload elsewhere.
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA
AAAFCAYAAACNbyblAAAAHElE
QVQYGe3BEQEAAAABIp1l/...
avatar.png
5×5 pixels, 68 bytes
Ready to download
Recovering an image embedded in HTML email source
You're debugging an HTML email and found a logo embedded as a Base64 data URI in the <img src> tag. You want to save it as a standalone file.
iVBORw0KGgoAAAANSUhEU
gAAASwAAABkCAYAAAA8AQ
(raw string, no data: prefix)
image.png
300×100 pixels, 4.2 KB
Lossless PNG format
Converting a JPEG data URL to a PNG file
The source is data:image/jpeg;base64,... but you need a PNG with transparency support. This tool re-encodes it as PNG regardless of the original MIME type.
data:image/jpeg;base64,/9j/4AAQ
SkZJRgABAQAAAQABAAD...
image.png
Re-encoded as lossless PNG
Original JPEG data preserved visually
Who Uses This
Pulling embedded images out of API payloads, JWT tokens, or database fields to inspect or reuse them.
Extracting inline Base64 images from HTML email templates for editing in Figma or Photoshop.
Verifying that Base64 encoded screenshots in test reports actually show the right content.
Converting chart images stored as Base64 in JSON exports into files they can paste into presentations.
Common Mistakes
Some email clients and text editors wrap long Base64 strings across multiple lines. If you see garbled output, remove all line breaks and spaces from the string before converting.
Base64 strings for images are often thousands of characters long. If you miss even a few characters at the end, the decode fails. Triple-click or use Ctrl+A in the source field to grab the whole thing.
URL-safe Base64 swaps + for - and / for _. If your string has dashes and underscores instead of plus signs and slashes, replace those characters first or the decode won't work.
Technical Details
- Processing: 100% client-side — nothing uploaded to any server
- Browser Support: Chrome, Firefox, Safari, Edge
- Input Formats: Data URLs (any MIME type) or raw Base64 strings
- Output Format: Standard PNG with lossless compression
- Max Size: Limited only by browser memory (typically handles images up to ~25 MP)
Frequently Asked Questions
How do I convert a Base64 string to a PNG image?
Paste the Base64 string into the text area and click "Convert." The tool decodes the string in your browser using the Canvas API and gives you a downloadable PNG. You don't need to install anything — it works right here in the browser.
What is a Base64 data URL?
A data URL starts with data:image/png;base64, followed by the encoded image data. It is a way to embed images directly in HTML or CSS without a separate file. This tool accepts both data URLs and plain Base64 strings without the prefix.
Is Base64 to PNG conversion lossless?
Yes, if the original image was PNG. The tool decodes the binary data and re-encodes it as PNG, which is a lossless format. If the original was JPEG, the JPEG compression artifacts are already baked in — the PNG output preserves what's there but can't undo the JPEG compression.
Why is my Base64 image not converting?
Usually it's a truncated string. Base64 image data can be thousands of characters long, and missing even one character breaks the decode. Check that you copied the entire string. Also watch for extra whitespace or line breaks — remove those before pasting.
Is it safe to paste Base64 data into an online tool?
With this tool, yes. Everything happens locally in your browser — the Base64 string is never sent to a server. You can verify by opening your browser's Network tab and watching for zero outgoing requests during conversion. Other online tools may not offer this guarantee, so always check.
Convert Base64 encoded strings to downloadable PNG images. Paste a data URL or raw Base64 string, preview the decoded image with dimensions and file size, then download as PNG. All processing runs in your browser — nothing is uploaded to any server.