Convert an image to Base64

Get the Base64 data URI of any image, ready to paste into HTML, CSS or code.

Your files never leave your device

How to use it

  1. Choose or drop your image.
  2. Click Copy to copy the data URI.
  3. Paste it into an img tag, a CSS background or your code.

A data URI puts the whole image inside your HTML or CSS, so the browser does not need a separate request for it. It is useful for small icons and email templates. Base64 makes the file about a third bigger, so it is not a good idea for large photos.

Frequently asked questions

What is a data URI?

A text that starts with data:image/... and contains the image encoded in Base64. Browsers can show it like a normal image link.

When should I use Base64 images?

For small icons, logos in email templates or when you need a single self-contained file.

Is my image uploaded?

No. The text is created in your browser.

More free tools