Image tool

Image to Base64

Turn an image into a Base64 data URI for HTML or CSS.

Free Files stay on your device
Choose an imageany image type · stays on your device

About this tool

Image to Base64 turns a picture into text that you can paste straight into HTML, CSS or JSON. This is useful for small icons and email templates. Your files are processed on your own device. Nothing is uploaded to our servers.

How to use Image to Base64

  1. Choose an image.
  2. Pick the output: data URI, raw Base64, HTML or CSS.
  3. Copy the code.

Questions people ask

When should I use Base64 images?

Use them for very small images like icons, where saving an extra network request matters. Large images grow about 33% bigger as Base64.

What is a data URI?

A data URI is a Base64 string with a prefix such as “data:image/png;base64,” that browsers can display directly.

Is there a size limit?

No hard limit, but strings for images over 1 MB become very long and slow to paste.

More image tools

See all 26 →
Esc