Image to Base64

Convert images to Base64 data URIs you can paste straight into HTML or CSS. Everything runs in your browser — your files never leave your device.

Drop images here

or browse files · PNG, JPG, WebP, SVG, GIF

How to convert an image to Base64

  1. Drop your images onto the box above, or click to browse.
  2. Choose whether you want the full data URI or raw Base64, and how to wrap it (plain, CSS, or an HTML tag).
  3. Click Copy to grab the string and paste it into your code.

What is Base64 and when should I use it?

Base64 turns an image into a long block of text called a data URI. You can paste it directly into your HTML or CSS so the image is embedded in the file itself — no separate download needed. This is handy for small icons, logos and email templates, where avoiding an extra network request speeds things up.

Because Base64 makes the data about 33% larger, it's best kept for small images. For large photos, a normal image file is usually the better choice.

Is it private and safe?

Yes. Toolyard encodes images inside your browser on your own device. Your files are never uploaded anywhere, so nothing can be stored or seen by anyone.

Frequently asked questions

What is a data URI?

A text version of your image that browsers can display directly, without loading a separate file.

Which formats work?

Any image your browser can open — PNG, JPG, WebP, GIF and SVG.

Are my images uploaded?

No. Everything runs on your device and nothing is sent anywhere.

Is it free?

Completely free, no sign-up.