Image to Base64
Encode images to Base64 strings | and decode them back. No upload.
Drop your image here
or click to browse · JPEG, PNG, WebP, GIF
What is Base64 image encoding?
Base64 is a way to represent binary data (like an image) as a plain ASCII text string. Developers use it to embed images directly inside HTML, CSS, or JSON without needing a separate file request. A data URI includes the MIME type prefix so it can be used directly as an src attribute or CSS url().
How to use it
- Encode: drop or select an image | the Base64 string and data URI appear instantly.
- Choose to copy the raw Base64 or the full data URI.
- Decode: paste a Base64 string or data URI into the decode tab to preview and download the image.
Frequently asked questions
Is my image sent to a server?
No. Encoding and decoding both happen entirely in your browser using the FileReader and Canvas APIs.
Why are Base64 strings so long?
Base64 encodes every 3 bytes of binary data as 4 ASCII characters, so the output is roughly 33% larger than the original file size.
What's the difference between Base64 and a data URI?
A data URI is Base64 with a prefix like data:image/png;base64,. Use the data URI when embedding in HTML/CSS; use raw Base64 when passing to an API or storing in JSON.
