AllToolsy

Image to Base64

Convert a picture into a Base64 data URI that you can paste into HTML, CSS or JSON.

🔒 Everything runs in your browser. Nothing you choose or type is uploaded. How to verify

How to use it

  1. Choose one image.
  2. Select Run.
  3. Copy the data URI.

Handy for

Embedding tiny icons in HTML, CSS or JSON without extra files.

Good to know

The result is a data URI starting with data:image. Paste it into an img src or a CSS url(). Keep it for tiny images, since it cannot be cached separately.

Privacy: where the work happens

Your picture is read by your browser and processed on this page with your device’s own image tools. The result is created on your device and offered as a download. Only the page code, and any library this tool needs, is downloaded from cdnjs or jsDelivr.

Questions

Why is the text longer than the file?

Base64 stores data as text, which adds roughly one third to the size.

When should I use it?

For very small icons inside code. Larger pictures are better as normal files.

Related tools