Image to Base64 / Base64 to Image
Convert local images to PNG data URLs or decode image Base64 into a downloadable PNG. Validate the resulting picture without uploading it.
From pixels to text. And back.
IN YOUR BROWSER / PRIVATE INPUT100% in your browser, files never leave your device.
Choose your file and settings. The original stays unchanged.
How to use the
Image to Base64 / Base64 to Image
- 01
Choose a direction
Encode accepts a file. Decode accepts a plain Base64 string or a base64 image data URL.
- 02
Provide a bounded input
Encoding accepts up to 6 MB per source; pasted Base64 is limited to 8 MB. The decoded image must pass the image safety checks.
- 03
Download the result
Encoding creates a text file containing a PNG data URL. Decoding creates a newly encoded PNG preview and download.
Base64 changes the representation, not privacy
Base64 represents binary bytes as printable characters. It is not encryption, and anyone who receives the text can decode it. It normally increases byte count by roughly one third before transport compression.
This tool normalizes the image through PNG pixels before encoding. It therefore does not promise a byte-for-byte round trip of the original compressed file or its metadata. Decode also re-encodes the validated image as PNG.
Recognize the data-URL prefix
data:image/png;base64,iVBORw0KGgo…data: URL scheme
image/png: media type
base64: encoding marker
After comma: encoded image bytesUse embedded images selectively
Keep large photos as files
Embedding large images can make markup difficult to review and prevent independent image caching.
Do not paste secrets into public documents
A data URL contains the complete image. Treat it with the same care as the original file.
Check the receiving field
Some applications expect only raw Base64, while others expect the complete data URL. Use the format the destination documents.
Image to Base64 / Base64 to Image:
questions, answered.
Is Base64 encryption?
No. It is a reversible representation of bytes, without a secret key.
Why does the encoded file say PNG?
This tool normalizes input pixels to PNG before generating the data URL, stripping original metadata.
Can I decode arbitrary files here?
No. The decoded bytes must form a supported image. This is not a general executable or document decoder.
Why is a shortened example rejected?
A valid Base64 image needs all its encoded bytes. Ellipses and truncated strings do not represent a complete image.
The calculations and checks above describe this tool's implementation. Use these primary references for the underlying formats and publishing guidance.
Canvas image export ↗ (opens in a new tab)From pixels to text. And back.
Choose your settings, inspect the result and download a new file. Your original remains unchanged.
Use the Image to Base64 / Base64 to Image↑