Base64 to PNG: Decode Data URIs in Your Browser

Paste a Base64 string or data: URI and decode it to a PNG locally. Keeps alpha transparency, no uploads, no server. Pure client-side decode.

Browser Native
Privacy First
Free Tool

Convert Now

or

Drag & drop your file here

or

How It Works

Developers embed images as Base64 to skip a separate network request, inlining them straight into HTML, CSS background rules, JSON payloads, and SVG markup as plain text. Eventually you need the real file back: to open it in a design tool, drop it into a ticket, or save it as a proper asset. This page takes that encoded string and writes out a decoded PNG. Paste the text into the box (a raw Base64 blob or a full data:image/...;base64, URI) or load a .txt file holding the string. The decoder splits off the data URI header at the first comma if one exists, runs the Base64 back to raw bytes, hands those bytes to the browser's image decoder, draws the result to a canvas, and re-encodes it as PNG. If the source carried an alpha channel, the transparency comes through to the output untouched. Worth knowing: the PNG encode itself is lossless, so it adds zero degradation. But the tool reproduces exactly the pixels the source held. If the Base64 was originally a JPEG, you get a pixel-perfect PNG of an already-compressed image, not a recovery of detail JPEG had thrown away. Everything runs in the page itself. The decode, draw, and re-encode all happen in your browser tab, so a string holding a private screenshot or an internal diagram never leaves your device.

Related Conversion Tools

Discover more powerful converters that might be useful for your workflow

Base64 to Image: Decode Any Data URI to PNG Free

Paste a Base64 string or data: URI and decode it to a viewable PNG file. Runs in your browser, handles any image format, nothing uploaded.

Base64 to JPEG: Decode Data URIs to a JPG File

Paste a Base64 string or data URI and download a real JPEG. Decoding runs entirely in your browser, nothing is uploaded. Free, instant, private.

AVIF to PNG Converter: Decode AV1 Images in Browser

Decode AVIF (AV1) images to lossless PNG in your browser, with transparency kept pixel for pixel. No uploads, no server, fully private and free.

.avif
Try Now

BMP to PNG Converter: Shrink Bitmaps Losslessly

Convert Windows BMP bitmaps to PNG in your browser. Lossless, no uploads. Cuts the bloat of uncompressed bitmaps while keeping every pixel intact.

PSD to PNG Converter: Open Photoshop Files in Browser

Open a Photoshop PSD without Photoshop. This tool reads the file's saved composite and exports a flat PNG with transparency, entirely in your browser.

PNG to SVG Converter: Trace Logos & Icons to Vector

Trace PNG logos, icons and line art into editable SVG paths in your browser. Free, no uploads, no watermark. Honest about what vectorizing can't do.

.png.jpg +1
Try Now

Key Features

  • No file uploads required - works offline
  • 100% privacy focused - client-side processing
  • Browser powered - no software installation
  • Fast processing - WebAssembly technology
  • Free forever - no premium accounts

Supported File Formats

.txt

Output Format: PNG

Technical Specifications

input Format Base64 text or data: URI (pasted or .txt file)
output Format PNG (Portable Network Graphics)
compression Type Lossless PNG (DEFLATE); the decode adds no further loss
quality Retention Pixel-exact reproduction of the decoded source; the PNG encode is lossless
color Space Support RGB and RGBA with a full 8-bit alpha channel
max Resolution Limited only by your device's memory
processing Time Instant, runs in your browser

Key Benefits

  • Decodes both raw Base64 and full data: URIs with no manual cleanup
  • Keeps alpha transparency intact for logos and icons
  • Runs entirely in your browser, so no string or image is uploaded
  • Shows a preview before you download the PNG
  • Accepts a pasted string or a .txt file holding the Base64
  • Lossless PNG encode adds no degradation to the decoded pixels

Common Use Cases

  • Pulling an inline image out of HTML or CSS back into a real PNG file
  • Extracting an image stored as a Base64 column in a database export
  • Saving an image returned inline in an API or JSON response
  • Recovering an icon from a data URI in an SVG or HTML email template
  • Inspecting what a Base64 blob in a log or config file actually renders as
  • Handing a decoded source PNG to a designer who needs the original asset

Pro Tips

  • Paste the full data:image/...;base64, prefix if you have it; the decoder handles it either way
  • For very long strings, load a .txt file instead of pasting to avoid editor lag
  • Strip line breaks or spaces an editor wrapped into the string before decoding
  • Expect a larger file if the source was a JPEG, since PNG is lossless
  • Check the preview to confirm transparency survived before downloading

Frequently Asked Questions

Both. Paste a complete data:image/png;base64,iVBORw0KGgo... URI exactly as it sits in your HTML or CSS, or paste just the payload with the header removed. The decoder splits at the first comma and drops anything before it, so you don't have to clean the string first.
Yes. PNG carries a full alpha channel, and the canvas decode keeps per-pixel transparency intact. A logo or icon with a transparent background in the source stays transparent in the downloaded PNG, with no white box filled in behind it.
It still decodes. The browser reads whatever format the bytes actually are and re-encodes the pixels as PNG. You get a faithful PNG copy of those pixels, but it won't restore detail JPEG compression already discarded, and the PNG file is usually larger because PNG is lossless while JPEG was not.
It all runs in your browser. The string is decoded, drawn to a canvas, and encoded to PNG on your own device. No text, byte, or image is sent to a server, which matters when the encoded data is a private screenshot, document scan, or internal asset.
Base64 inflates binary by roughly a third, so a large image becomes a very long string. The ceiling is your device's available memory, not a fixed cap. If a giant paste lags the text box, loading the same string from a .txt file is steadier.
Usually the string is truncated or has stray characters. Copy the entire payload, strip any line breaks or spaces an editor wrapped in, and confirm it actually encodes an image rather than some other binary. The most common failure is a half-copied string that cuts off before the image data ends.
Yes. If your Base64 lives in a .txt file, load that file and the tool reads its contents and decodes them the same way as a paste. This is handy for long strings exported from a database column or pulled out of an API response log.