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.

Browser Native
Privacy First
Free Tool

Convert Now

or

Drag & drop your file here

or

How It Works

You copied a long string starting with `data:image/png;base64,iVBORw0KGgo...` out of a CSS file, a JSON response, or a DevTools panel, and now you need to actually see the image it stands for. That is the whole job here: paste the string, get a PNG you can open and save. Two input shapes both work. A full data URI carries its own media type in the prefix; a bare Base64 body has no prefix at all. The decoder strips the prefix when it finds one, runs a standard Base64 decode to recover the raw bytes, and hands those bytes to the browser's image decoder. Whatever the bytes describe (PNG, JPEG, WebP, GIF) gets drawn to a canvas and written out as PNG. The re-encode shapes what you get back. Pixel values are copied exactly, so the step is lossless: transparency survives, colors don't shift, edges stay sharp. But the output is a fresh PNG, not the source file's original bytes. Feed it a JPEG data URI and you get a pixel-identical PNG, typically larger than the JPEG was, because PNG can't reuse JPEG's compression. The string never leaves your machine. Decoding happens in JavaScript using the built-in Canvas and image-decoding APIs, which matters when the blob came from an internal export, a customer record, or anything you'd rather not paste into a stranger's server.

Related Conversion Tools

Discover more powerful converters that might be useful for your workflow

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.

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.

PNG to JXL Converter: Lossless, Smaller, Private

Convert PNG to JXL (JPEG XL) in your browser. Lossless mode keeps every pixel and the alpha channel while cutting size below PNG. No uploads, fully client-side.

AVIF to JPEG Converter: Decode AV1 Images to JPG

Convert AVIF (AV1) images to JPEG right in your browser. WASM AV1 decode, native JPEG encode, no uploads. Get a JPG any legacy app or upload form will open.

.avif
Try Now

PNG to AVIF Converter - Lossless, Keeps Transparency

Convert PNG to lossless AVIF in your browser. AV1 intra coding shrinks the file while keeping every pixel and full transparency. No uploads, runs locally.

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

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 (PNG, JPEG, WebP, or GIF bytes)
output Format PNG (Portable Network Graphics)
compression Type Lossless PNG (DEFLATE), re-encoded from decoded pixels
quality Retention Pixel-exact on the PNG encode; no quality loss added
color Space Support sRGB with full 8-bit alpha channel preserved
max Resolution Limited only by your device's memory
processing Time Instant, runs in your browser

Key Benefits

  • Accepts both full data: URIs and bare Base64 bodies, with no manual prefix editing
  • Reads any browser-decodable source format and normalizes the result to PNG
  • Lossless PNG encode that keeps transparency and exact pixel colors
  • Runs fully client-side, so internal or private image data never leaves your device
  • Shows a preview so you can confirm the right image before saving
  • Takes pasted text or a .txt file, useful for strings too long to copy cleanly

Common Use Cases

  • Inspecting a Base64 image pulled from a JSON API response or a log line
  • Recovering a viewable file from a data: URI embedded in CSS or HTML
  • Extracting an image stored as a Base64 column in a database export
  • Checking what an avatar or asset string from a config or env file actually contains
  • Saving a copied data: URI from browser DevTools as a real PNG
  • Turning a Base64 blob from an email template into an editable image file

Pro Tips

  • If the decode fails, re-copy the full string including any trailing = padding; truncated copies are the most common cause.
  • Load the string from a .txt file when it's too long to paste reliably from the clipboard.
  • Strip surrounding quotes and escaped characters if you pulled the value out of JSON or an HTML attribute.
  • Expect a larger file than the JPEG source, since PNG is lossless and can't reuse JPEG compression.
  • Use the preview to confirm transparency rendered correctly before you download.

Frequently Asked Questions

Both work. If your string starts with data:image/...;base64, the decoder reads the media type from the prefix and strips it for you. If you only have the raw Base64 body, paste it as-is and it decodes the same way. Whitespace and line breaks inside the string are tolerated, so wrapped or indented blobs are fine.
Yes. The decoder reads the underlying image bytes regardless of source format, then re-encodes the pixels as PNG. You get a real .png file with pixels identical to the source. You won't get the original JPEG bytes back, and because PNG is lossless it can't reuse JPEG's compression, so the output file is usually larger than the JPEG was.
Yes. PNG carries a full alpha channel and the canvas keeps it intact, so transparent regions in the decoded image stay transparent in the output. That's the main reason PNG is the safe default when you're decoding image data of unknown origin and don't want to flatten an alpha channel onto a background.
For the encode step, yes. PNG is a lossless format and the decode-then-encode copies every pixel value, so colors and edges are unchanged. The one nuance: lossless here means the pixels you see are preserved, not that the source file's exact bytes are reproduced. A JPEG source stays visually identical but becomes a new PNG file.
Nowhere. The decode runs entirely in your browser in JavaScript. The Base64 string is never uploaded and nothing is stored after you close the tab. That's the reason to use a local tool when the encoded image came from an internal system, a private export, or a record that shouldn't touch a third-party server.
Almost always one of three things: the string is truncated (a copy that cut off the end, including the trailing = padding), it contains characters that aren't valid Base64, or the decoded bytes aren't actually an image. If you grabbed the value out of JSON or an HTML attribute, make sure you took the whole value and didn't include the surrounding quotes or escape characters.
It's bounded by your device's available memory, not a fixed limit we impose. A big image encodes to a long string, and the browser has to hold both the text and the decoded bitmap at once, so multi-megabyte blobs work but feel heavier on low-memory devices. If a paste stalls, load the string from a .txt file instead.
This page already does it locally, with nothing leaving your browser. If you prefer the command line: on macOS or Linux, base64 -d encoded.txt > image.png decodes a bare Base64 file, but you have to strip the data:...;base64, prefix yourself first. The browser tool handles the prefix and any source format automatically and previews the result before you save.