Image to Base64

Turn an image into a Base64 data URI ready to paste into CSS or HTML.

100% private - files never leave your browser

Loading tool…

Encode any image into a Base64 data URI you can embed directly in CSS, HTML or JSON - handy for inlining small icons and avoiding extra network requests. Drop in a PNG, JPG, SVG or WebP and copy the ready-made data URI or a full <img> tag. The encoding happens in your browser, so your images are never uploaded.

How to use Image to Base64

  1. 1

    Upload the image you want to encode.

  2. 2

    Copy the generated Base64 data URI or <img> tag.

  3. 3

    Paste it into your CSS, HTML or code.

Frequently asked questions

It lets you embed an image directly in code, avoiding a separate file request. It is best for small images like icons.