Image to Base64
Encode any image as a Base64 data URI for embedding in CSS or HTML.
Loading module…
About this tool
Image to Base64 encodes any image as a Base64 data URI you can paste directly into HTML, CSS, or JSON. Useful for small icons and assets where avoiding an extra HTTP request matters more than the ~33% size overhead of the encoding.
Data URIs shine for tiny images: favicons, email templates (where external images get blocked), and single-file HTML exports. For larger images, linking the file is almost always better.
How to use
- 1Drop an image onto the upload area.
- 2The Base64 data URI is generated instantly.
- 3Copy the full string or download it as a .txt file.
Frequently asked questions
For very small images (under a few KB) where the HTTP request overhead exceeds the encoding penalty — icons, spacers, email assets. Large images bloat your HTML and can't be cached separately.