Image to Base64 Converter

Embed an image in HTML or CSS as a data URI.

Runs in your browser Image Tools Free · No account

Input

Processed locally

This tool runs entirely in your browser. The data you paste or load is never uploaded.

Result

Enter your input, then run the tool.

About this tool

Encodes an image as a Base64 data URI, ready to paste into a stylesheet or email. Small icons are the right candidate; the tool warns when the encoded string is large enough to hurt page weight.

How to use it

  1. Choose an image file.
  2. Wait for the encoded string and size warning.
  3. Copy the data URI or the ready-made CSS rule.

Frequently asked questions

When should I inline an image?
Only for tiny assets such as icons under a few kilobytes, and only when the extra request would cost more than the bytes.
Why is the Base64 version bigger?
Base64 adds roughly 33% overhead. HTTP compression can reduce it, but not to the original size.

Keep going

More in this category