Home › Image tools › Image to Base64

Image to Base64

Turn a picture into a Base64 data URI for HTML, CSS or e-mail.

Files uploaded: 0🔒 Processed on your device

Choose a picture or drop it here

They stay on your device.

Developers embed small icons and logos directly in HTML, CSS or JSON as Base64 text so no separate file has to load. Base64 is about a third larger than the file itself, so use it for small images.

How it works

  1. Choose a picture.
  2. Copy the data URI, the HTML tag or the CSS line.
  3. Or click Download .txt to save it as a text file.

Questions

Is my picture uploaded?

No. Everything happens in your browser on your own device – the “Files uploaded” counter above stays at 0.

Why is the Base64 text bigger than my file?

Base64 writes every 3 bytes as 4 characters, so it is about 33% larger. Compress the picture first for the smallest result.