Image to Base64
Image toolNewEncode an image as a Base64 data URI.
This tool runs entirely in your browser. Your files never leave your device — nothing is uploaded.
Add an image
Drop an image hereJPG, PNG or WebP — encoded privately in your browserBrowse files
Base64 data URI
Add an image to convert it to a Base64 data URI.
Frequently asked questions
What is an image Base64 data URI and when should I use one?
A Base64 data URI embeds an image directly inside text as a long string beginning with data:image/...;base64,. It is handy for inlining small icons in HTML or CSS so they load without an extra network request. Note that Base64 encoding makes the data roughly a third larger, so it works best for small assets rather than large photos.
Are my images uploaded to a server when I convert them?
No. The conversion happens entirely in your browser using the FileReader API, so your image never leaves your device and is never sent to any server. This makes it safe for private, confidential, or sensitive images. Nothing is stored or logged.
How do I use the Base64 result in my code?
Copy the data URI and drop it straight into an HTML img src attribute, or use the Copy CSS snippet button to get a ready-made background-image rule. For very large images the on-screen preview is truncated, but the copy buttons always give you the complete, working string.