Back to tools

Base64 to Image

Rendering and Downloading an Image from a Base64 Data URL

Base64 data URLs are everywhere: copied out of developer tools, pasted into issue trackers, embedded in JSON payloads, and stored in databases. But a string is not an image you can open, print, or upload anywhere else. This tool takes a data:image/... URL, decodes it back into the original binary file, renders a live preview, and hands you a downloadable PNG, JPEG, GIF, or WebP ready for use.

You need it whenever someone shares an image as a giant blob of text, or when an export process gives you Base64 instead of a file. Instead of pasting the string into a scratch page and saving the result by hand, the decoder does the whole round trip in one step and even reports the decoded file size so you can confirm nothing was lost.

How to Decode a Base64 Data URL

  1. Open the Base64 to Image tool and paste the full data URL, including the data:image/png;base64, prefix, into the text area.
  2. Check the automatic MIME type detection; the tool reads image/jpeg, image/png, or another type from the prefix.
  3. Review the live preview, which renders the decoded image instantly so you can verify the content.
  4. Inspect the reported output size, which should match the original file size before encoding.
  5. Click the download button to save the decoded image to your device with the correct file extension.
  6. If the input was a raw Base64 string without the prefix, add data:image/png;base64, manually or use a plain Base64 decoder first.

Real Example: Input and Output

A support ticket contains a screenshot pasted as a data URL. Pasting that string into the tool recovers the original screenshot file for inspection.

InputOutput
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJ...screenshot.png, decoded and downloaded, MIME type image/png

Tips for Best Results

When to Use This Tool

Decoding Pitfalls and How to Avoid Them

Most decode failures trace back to a broken copy, not a broken tool. The data URL is long, and partial selection or line-wrapping by the source application can silently truncate it. Copy the entire value, paste it into the input, and let the preview tell you whether it worked before downloading.

Frequently Asked Questions

Can the tool decode Base64 without the data URL prefix?

Not reliably, because the prefix carries the MIME type. Without it the tool cannot tell whether the payload is a PNG, JPEG, or something else.

Why does my decoded file look corrupted?

Usually the copied string was truncated, had characters swapped, or used the URL-safe alphabet. Re-copy the full value and retry.

Is decoding done in the browser?

Yes, the entire decode and preview happen locally with JavaScript, so image data never leaves your machine.

What file types can I get back?

Whatever the original was: PNG, JPEG, GIF, WebP, and other types whose MIME prefix appears in the data URL.

Do the = padding characters matter?

They are required for valid Base64. Most pasted strings include them, and the tool handles standard padding automatically.

Can I decode very large images with this tool?

Yes, but extremely long strings may take a moment, and the browser's memory limits the practical maximum size.

What if my input is a plain Base64 string, not a data URL?

Use a general Base64 decoder that outputs raw bytes, then rename the result with the correct extension such as .png.

Does the download keep the original quality?

Yes, decoding is lossless: the bytes you download are exactly the bytes that were encoded, so quality and dimensions are preserved.