Image to Base64

Encode any image as a Base64 data URI with ready-to-paste HTML and CSS snippets. Free, and it runs in your browser.

🔒 Files never leave your device

Embed small images directly in HTML, CSS, JSON or email templates. Drop in an image and copy the encoded string or a ready-made snippet.

How to use the Image to Base64 tool

  1. Choose or drop an image.
  2. Copy the Base64 data URI, or the ready-made HTML or CSS snippet.
  3. Paste it into your code.

Frequently asked questions

When should I use Base64 images?

For small icons and images under a few KB, inlining saves an HTTP request. For larger images a normal file is better, because Base64 makes the data about 33% bigger and it can't be cached separately.

Is my image uploaded?

No. The encoding uses your browser's FileReader, so it all happens locally.

Related tools