Convert any image to a Base64 data URI string for use in CSS, HTML or JSON.
Drop your image file here
or click to browse
Image • Max 100MB
Image to Base64 converts an image into a Base64-encoded text string that developers can embed directly into HTML, CSS, or JSON without linking to a separate image file. Upload your image and the tool generates the encoded string instantly, ready to copy into your code. This is commonly used for small icons or logos in email templates (where external images are often blocked), inline CSS backgrounds, or embedding an image directly into an API payload where a file reference isn't practical.
Drop your image into the box. Encoding happens in your browser — the file never touches a server.
The tool reads the file and outputs a Base64 data URI string, ready to copy.
Paste it into your HTML as an img src or into CSS as a background-image — no separate image file needed.
Keep in mind Base64 inflates size by about a third, so it suits small icons and logos better than big photos.
Instant data URIs for HTML, CSS, and JSON — one less HTTP request, zero image hosting, all offline.
Get a ready-to-use Base64 string for HTML, CSS, or JSON.
Great for email templates where external images get blocked.
Copy the code directly, no separate file hosting needed.
Encoding happens in your browser — your image is never uploaded.
Encode unlimited images at no cost.
Base64 is a text encoding that lets binary data, like an image, be embedded directly into HTML, CSS, or JSON as a string.
Embedding icons in email templates, inline CSS backgrounds, or including an image directly in an API payload.
Yes, this tool is completely free with no limit on how many images you encode.
Base64 encoding increases file size by roughly 33%, so it's best suited for small images like icons and logos.
No. Encoding happens entirely in your browser, so your image stays private.
Encode your image as a Base64 string