HomeDev Tools › Image to Base64

Image to Base64 / Data URI

Convert an image to a Base64 string / Data URI to embed directly in HTML/CSS.

Convert an image into a Base64 string (data URI) to embed directly in HTML/CSS without a separate file.

How to use Image to Base64

  1. Choose an image.
  2. Copy the data URI string.
  3. Paste it into a src attribute or a CSS background property.

Frequently asked questions

When should I embed an image as base64?

For small icons or images, to reduce the number of requests; avoid it for large images, since a long base64 string bloats your HTML/CSS file.

🔒 Image to Base64 / Data URI runs entirely in your browser — the data you enter is not sent to any server. Free, no sign-up required. See145 free dev tools more.