Convert Base64 to PNG
Paste a Base64 string — raw, as a data: URI, or wrapped in a CSS url() — and get a proper PNG back to download. Decoding runs in your browser, so whatever you paste never leaves your machine. Useful for pulling an image out of code, an API response, or a stylesheet.
What it accepts
- A full data URI —
data:image/png;base64,iVBORw0K… - Raw Base64 — just the encoded characters, no prefix.
- A CSS wrapper —
background-image: url('data:image/png;base64,…'); the string inside is extracted automatically.
How it works
The string is decoded to bytes, loaded as an image, and re-saved through a canvas as a clean PNG — so even if the source was a JPEG or WebP data URI, you get a valid PNG out. If what you pasted isn't a decodable image at all, you'll still be offered the raw decoded bytes to download, with a note explaining why.
FAQ
How do I turn a Base64 string into an image?
Paste it into the box above and click Decode to PNG. The decoded image appears with a Download link — all done in your browser, nothing uploaded.
Do I need the data:image/png;base64, prefix?
No — paste it with or without. The tool strips a data-URI or CSS url() wrapper if present, and treats the rest as raw Base64.
It says the Base64 is invalid — why?
Usually a stray character or a truncated copy. Base64 uses only A–Z, a–z, 0–9, +, / and = padding; make sure you copied the whole string.
Can I encode an image the other way?
Yes — PNG to Base64 does the reverse.