Skip to content

Image to Base64 Converter

Turn an image into a Base64 string or a data URI you can paste straight into HTML or CSS. Your image never leaves your browser.

Select image

Click or Drag & Drop an Image

What is Image to Base64 Converter?

Base64 can write an image as plain text. A data URI places that text straight into a web page or a style sheet, so the image needs no separate file or request.

What this tool does

Reads the image you choose in your browser and gives you its Base64 text, the full data URI, a ready-made HTML image tag and a CSS background rule.

How to use it

  1. Click the box or drop an image on it.
  2. Check the preview and the size.
  3. Copy the format you need.

Did you know?

  • Base64 makes data about one third larger, so inline images suit small icons better than large photos.
  • Data URIs are defined in RFC 2397, from 1998.

More tools in this category