filemarkr
All ToolsGuides
filemarkr

60+ free developer tools that run entirely in your browser — JSON formatter, JWT decoder, Base64, diff checker, regex tester, hash generator and more. No upload, no sign-up, completely private.

JSON & Data

  • JSON Formatter
  • JSON Minifier
  • JSON Validator
  • JSON to CSV
  • CSV to JSON
  • JSON to YAML

Encode & Decode

  • Base64 Encode / Decode
  • Base64 to Image
  • Image to Base64
  • URL Encode / Decode
  • HTML Entity Encoder
  • JWT Decoder

Text Tools

  • Text Diff Checker
  • Case Converter
  • Word & Character Counter
  • Slug Generator
  • Remove Duplicate Lines
  • Sort Text Lines

Generators

  • UUID Generator
  • Password Generator
  • Lorem Ipsum Generator
  • QR Code Generator
  • Random Number Generator
  • NanoID Generator

Popular Guides

  • How to Format and Pretty-Print JSON (Without Breaking It)
  • How to Minify JSON and Shrink Your API Payloads
  • How to Validate JSON and Pinpoint the Exact Syntax Error
  • How to Convert JSON to CSV for Excel and Google Sheets
  • How to Convert CSV to JSON (With Proper Header Detection)
  • All guides →

Explore

  • All Tools
  • JSON Formatter
  • JWT Decoder
  • Diff Checker
  • UUID Generator

Company

  • About
  • Privacy
  • Terms
  • Sitemap

Our Promise

  • 100% in your browser
  • Zero uploads
  • No sign-up, always free

© 2026 filemarkr. Designed & developed by Naved Naik.  All processing happens locally in your browser.

All guides

Encode & Decode

Base64 to Image: Preview and Save Pictures from a Data URI String

Got a long Base64 blob and no idea what image it is? Learn how data URIs work and how to preview, verify and download the picture in seconds.

Try the toolBase64 to Image →

The problem: a wall of Base64, no picture

You are reading a CSS file, an API response or an HTML email and you find a giant string like data:image/png;base64,iVBORw0KGgo.... It is an image — but which one? Copying thousands of characters into a browser bar rarely works, and you just want to see it and maybe save it as a real file. A Base64-to-image tool decodes that string and renders the actual picture so you can verify and download it.

How Base64 images work

Images are binary. To embed one directly inside text-based formats like HTML or CSS — avoiding a separate network request — the bytes are Base64-encoded into a data URI. A data URI has a simple, well-defined shape:

data:[<media-type>][;base64],<data>

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA...
  • data: — the scheme that says "the data is right here".
  • image/png — the MIME type telling the browser how to render it (image/jpeg, image/gif, image/svg+xml, image/webp, and so on).
  • ;base64 — a flag that the payload is Base64-encoded.
  • everything after the comma — the encoded image bytes.

To display it, a browser reverses the process: strip the prefix, Base64-decode the payload back to raw bytes, and hand those bytes to the image decoder for that MIME type.

A practical walkthrough

Paste the full string — with or without the data:image/... prefix — into the Base64 to Image tool and it renders the picture instantly, then offers a download button. Because it all runs locally in your browser, no image data ever leaves your machine, which matters when the asset is private.

If you prefer to do it in code, the browser makes it a one-liner — assign the data URI straight to an <img> element:

const img = document.createElement("img");
img.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA...";
document.body.appendChild(img);

// To trigger a download of the decoded file:
const a = document.createElement("a");
a.href = img.src;
a.download = "decoded.png";
a.click();

Common pitfalls and tips

  • Missing or wrong MIME type: If the string has no data: prefix, the tool assumes a type — but a mismatch (say, labeling a JPEG as PNG) can stop it from rendering. Match the prefix to the real format.
  • Stray whitespace and newlines: Base64 copied from source files often carries line breaks or quotes. These usually need stripping before the payload will decode cleanly.
  • URL-encoding: A data URI pulled from an href or CSS url() may be percent-encoded (%2B for +). Decode that first — the URL Encode / Decode tool handles it.
  • Not every Base64 is an image: If the payload is a PDF, font or plain text, it will not render as a picture. Check the MIME type in the prefix.
  • Size: Base64 inflates data by about 33%, so large images make very long strings. That is expected, not a corruption.

Need to go the other way? The Image to Base64 tool encodes a file into a data URI, and Base64 Encode / Decode handles plain text.

Conclusion

A Base64 image is just binary wrapped in a data URI so it can travel inside text. Once you recognize the data:image/type;base64, pattern, decoding it is straightforward: strip the prefix, decode the payload, render the bytes. When you would rather skip the parsing, paste the string, confirm the preview, and download the file — all privately in your browser.

More guides

How to Format and Pretty-Print JSON (Without Breaking It)

Read

How to Minify JSON and Shrink Your API Payloads

Read

How to Validate JSON and Pinpoint the Exact Syntax Error

Read

How to Convert JSON to CSV for Excel and Google Sheets

Read