Image to Base64

Encode an image to a Base64 data URI you can paste into code or CSS.

Base64 data URI
No file selected

Your image never leaves this browser.

How to use this tool

  1. Choose or drop an image.
  2. Wait for the Base64 data URI to appear.
  3. Copy it into your HTML, CSS or JSON.

Example

A small PNG becomes a string like data:image/png;base64,iVBORw0KGgo… ready to embed.

How it works

The file is read as a data URL using the browser's FileReader, so nothing is uploaded.

Frequently asked questions

When is Base64 useful?

For embedding small images directly in HTML, CSS, SVG or single-file documents.

Is the string larger than the file?

Yes. Base64 adds roughly 33% overhead, so it is best for small images.