Convert an image to Base64

Encode any image as a Base64 data URI you can paste directly into HTML, CSS or JSON. Get ready-made <img> and CSS background snippets — generated locally, with no upload.

Loading…

Ad

How to use

  1. Select or drop an image.
  2. Copy the Base64 data URI or a ready-made HTML/CSS snippet.
  3. Paste it into your code.

Frequently asked questions

When should I use Base64 images?

For tiny icons or inlining a single asset to save a request. Large images become much bigger as Base64, so use sparingly.

What do I get?

The raw data URI plus copy-paste <img> and CSS background-image snippets.

Is my image uploaded?

No — encoding happens entirely in your browser.

About this tool

Encode any image as a Base64 data URI you can paste straight into HTML, CSS or JSON. Get ready-made <img> and CSS background snippets — generated locally, no upload.

Related tools