Skip to main content

Developer

Base64 to image decoder

Paste a Base64 string (with or without the `data:image/...;base64,` prefix) and download the decoded image. Everything happens in your browser.

Runs in your browserPrivate by design

How this tool handles files

Processing
In your browser, on-device
Storage
Nothing stored
Output
A file you download
Your responsibility
Review before official use
  • Runs in your browser. Your file is processed on your own device and, on this site, is not uploaded to our servers.
  • Nothing is stored. Your file and its output are gone the moment you close or reload the page.
  • Review sensitive files (bank, ID, medical) and check the output before sharing it.

Every tool on FormatOS runs in your browser. Read our Privacy Policy and File Handling Policy.

Common uses

  • Recover an image stored as a Base64 string in JSON or YAML
  • Inspect an inlined data URL pulled from a CSS or HTML file
  • Save an attachment delivered in a Base64 API response

Turning a Base64 string back into a file

This tool does the reverse of encoding: paste a Base64 string and it reconstructs the original image, shows a preview, and lets you download it as a real file. It is the quick way to recover an image that has been stored or transmitted as text — pulled from a JSON field, a YAML config, a database column, an API response, or an inlined data URL in someone else's HTML or CSS.

You can paste the string with or without the data:image/…;base64, prefix. If the prefix is present, the tool reads the image type from it and names the download accordingly (for example formatos-decoded.png or formatos-decoded.jpg). If you paste only the raw encoded characters with no prefix, the tool assumes PNG and decodes it as such — so when you know the original was a JPG or WebP, include the full prefix to get the correct file type.

Whitespace and line breaks in the pasted text are tolerated; they are stripped before decoding. What matters is that the actual Base64 characters are complete and unaltered.

Why decoding sometimes fails

Decoding only works if the string is valid, complete Base64. The most common failure is a truncated copy — a long data URL that got cut off when it was stored or pasted will not decode, or will decode to a broken image. Copy the entire string from the very first character to the last, with nothing trimmed.

Other causes are corruption and a mismatched type. If characters were altered, re-wrapped, or URL-escaped along the way, the bytes no longer reconstruct a valid image. And if you strip the prefix from a JPG or WebP string, the tool will treat it as PNG; the file may still open, but the extension can be wrong. When in doubt, keep the original data: prefix so the type is read correctly.

A reminder that mirrors the encoder: Base64 is encoding, not encryption. A string you can decode here, anyone can decode — there is no password and no protection. Treat the contents of any Base64 image as fully readable.

How your data is handled

Decoding runs entirely in your browser. On this site, the pasted string is processed on your own device and is not uploaded to our servers, and nothing is stored after you leave the page — so recovering a private image from a config file or an API response stays on your machine. Review the decoded image before forwarding it, since the source string came from elsewhere.

If you have the opposite need — turning an image file into a Base64 string for inlining or storage — use the Image to Base64 encoder. The two tools are a matched pair: encode to text, decode back to a file.

Frequently asked questions

No, it is optional. If you paste the full data:image/...;base64,... prefix, the tool reads the image type from it and names the download correctly. If you paste only the raw encoded characters, it assumes PNG — so include the prefix when the original was a JPG or WebP.

The most common cause is a truncated copy — a long string cut off when it was stored or pasted. Copy the entire string from the first character to the last. Corruption, re-wrapping, or URL-escaping along the way can also break decoding.

Whatever the source string encodes — PNG, JPG, WebP, or GIF. The type is taken from the data: prefix when present; without a prefix the file is treated as PNG.

Base64 is encoding, not encryption — any string you can decode here, anyone can decode. There is no password protection. Treat the contents as fully readable, and review the image before forwarding it since the string came from elsewhere.

No. Decoding runs entirely in your browser. On this site, the pasted string is processed on your own device and is not uploaded to our servers, and nothing is stored once you close or reload the page.

Related tools