Recover an image file from a base64 Data URI
How to use this tool
- Paste a complete data:image/...;base64,... URI.
- Decode and check the image preview.
- Download the original encoded image.
What a Data URI contains
A Data URI includes the MIME type and base64-encoded file bytes. This tool supports PNG, JPEG, GIF, and WebP. SVG and non-image data are rejected. Decoding preserves the original bytes rather than re-encoding the image.
Understanding the parts of the input
A Data URI contains file data inside a text string. For this converter, the string begins with data:, specifies an image MIME type, includes ;base64, and then contains the encoded bytes after a comma. A normal https:// image address is different: it identifies a network resource rather than containing the image itself.
Paste the complete URI, including its prefix. For example, the beginning data:image/png;base64, describes a PNG payload, but it is only a prefix and not a usable image by itself. The characters that follow must encode a real, complete PNG file.
Supported image types and validation
This decoder accepts PNG, JPEG, GIF, and WebP base64 image URIs. It checks that the beginning of the decoded file matches the declared type, then verifies that the browser can decode the image. A string claiming to be PNG will be rejected if its bytes identify another format.
SVG and non-image MIME types are not supported. This avoids treating arbitrary markup or another document type as a downloadable raster image. Percent-encoded image strings, bare base64 without the MIME prefix, and CSS url(...) wrappers need to be converted into the supported complete form first.
| Format | Prefix before the encoded bytes |
|---|---|
| PNG | data:image/png;base64, |
| JPEG | data:image/jpeg;base64, |
| GIF | data:image/gif;base64, |
| WebP | data:image/webp;base64, |
Decoding preserves the original file bytes
This is a decoding operation rather than a new image encoding. The base64 payload is reconstructed as a file and the original image bytes are used for the download. It does not resize the picture, change its quality, remove its metadata, or convert its format.
Base64 text is typically longer than the binary file it describes. Downloading the recovered image therefore produces a different size from the text representation without requiring image compression. If the image itself is still too large, use a compressor after decoding.
Tools for this step: Compress the recovered image · Convert a decoded JPEG to WebP
Common reasons a Data URI fails
Check for truncated text, missing padding, an incorrect MIME type, or copied quotation marks around the URI. A base64 string that was cut off by another application cannot reconstruct bytes that are no longer present. Return to the source and copy the full value rather than repeatedly pressing Decode.
The decoded image must fit the tool’s file-size and working-dimension limits. A very long URI can also be hard to handle because the text, binary data, and preview coexist during processing. Avoid pasting unrelated document content, and reset the tool when the conversion is complete.
Frequently asked questions
Is this tool free and unlimited?
Yes. It is free to use with no signup and no daily usage caps. You can process up to 20 files of up to 30MB each in one batch, then download your results.
Can I paste an image URL instead of a Data URI?
No. This converter decodes embedded base64 bytes and does not fetch remote image addresses. Download an image through an authorized source if you need to work with a normal URL.
Does decoding remove camera metadata?
No. The original encoded image bytes are preserved, including metadata present in those bytes. A later image re-encoding may handle metadata differently, but this decoder does not promise metadata removal.
Can this tool encode an image into a Data URI?
This page implements the Data-URI-to-image direction only. It does not expose an image-to-base64 encoder.