Finding the format
The format is detected from the decoded data's first bytes, not from the data URL's label, which is sometimes wrong. PNG, JPEG, GIF, WebP, AVIF, BMP, ICO and SVG are previewed. Other files, such as PDFs, are recognised and offered as a download.
How to use the Base64 to Image
- Paste the Base64 or data URL, or press Sample.
- See the image, its format, dimensions and size.
- Download it with the right file extension.
Examples
A data URL
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAMUlEQVR42mNQTX5NEmKgpob/SIBYG9BUj2ogWQOmHLU1YEpjNYIBT3LAVE3txIcVAQBxE6juTdcndAAAAABJRU5ErkJggg==png, 106 bytesBase64 without a prefix
R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==gif, 43 bytesThe classic 1 × 1 transparent GIF used for tracking pixels. Its format is found from its first bytes, GIF89a.
Limitations
- The input can be up to about 10 MB of Base64.
- HEIC and TIFF images can't be previewed in most browsers.
Frequently asked questions
Is my data uploaded?
No. Decoding and the preview happen in your browser.
Why does it say the data isn't an image?
The Base64 decodes to something else, such as text or a PDF. Check that you copied the image data and not the surrounding JSON or HTML.
How do I convert an image to Base64?
Use Image to Base64.