All Tools › Image to Base64

Image to Base64

Encode an image as a Base64 data URI, great for embedding in CSS or HTML.

🖇️
Click to upload or drag & drop an image
PNG, JPG, WebP, SVG, GIF

Turn an image into a Base64 data URI

A data URI embeds an image directly inside your HTML or CSS as text, so it loads with the page instead of as a separate request. That can speed up small icons and remove a dependency on an external file. This tool reads an image in your browser and outputs its Base64 data URI, ready to paste into a src or background-image.

How to use it

  1. Drop in an image file.
  2. Copy the generated data URI.
  3. Paste it into your HTML img tag or CSS.

When it is worth it

Questions people ask

Should I inline large images? No — Base64 adds about a third to the size and can't be cached separately, so reserve it for small assets.

Is my image uploaded? No — it's read and encoded locally in your browser.