Skip to content

Convert Base64 to an image online

Runs in your browser — this file is never uploaded

Turn base64 text — or a full data URI — back into a real image file you can open, view, and save normally. Save the string into a plain .txt file, add it here, and download the decoded image.

This works with either form: a bare base64 string, or a complete data URI (data:image/png;base64,...) with the format declared in the prefix. Either way, the output format is detected from the decoded bytes themselves, not guessed from anything you typed.

Your data never leaves your device. Decoding runs entirely in your browser, so nothing is uploaded, stored, or scanned.

or drop them here — nothing is uploaded

How to base64 to image

  1. Save your base64 as a text file

    Paste the base64 string or full data URI into a plain text editor and save it as a .txt file.

  2. Add the file

    Drop the .txt file into the box, or click to browse.

  3. Decode and download

    Press Base64 to Image. The image downloads in whatever format the data actually is.

Frequently asked questions

Are my files uploaded anywhere?

No. Decoding runs in your browser using JavaScript, so nothing leaves your device. You can confirm this by opening your browser devtools Network tab while working — there are no upload requests.

Why do I need to save it as a .txt file first, instead of pasting it directly?

This tool uses the same drag-and-drop file box every tool on the site does, rather than a separate paste box just for this one case — one interaction pattern instead of two. A base64 string is already just text, so saving it into a plain .txt file takes a few seconds and works identically.

What if my text file has line breaks in the middle of the string?

That's fine — line breaks and other whitespace are stripped automatically before decoding, since some editors and email clients wrap long base64 strings automatically.

Does it matter if I include the data:image/...;base64, prefix?

No — with or without it works. If the prefix is present, everything before the first comma is ignored; the actual image format is always detected from the decoded bytes, not from that prefix.

What formats can this decode to?

Whatever the original encoded data actually is — JPG, PNG, WebP, GIF, or BMP are all detected automatically from the decoded bytes.

I need to go the other way — encode an image to base64?

That is Image to Base64, a separate tool built for that direction.