Image to Base64

Convert an image to a Base64 data URI for use in HTML, CSS or JSON.

Tool

Was this tool useful?

About this tool

About Image to Base64

Embedding small images as Base64 can save an HTTP request for icons and tiny graphics.

How it works

Base64 turns every 3 bytes into 4 text characters, so the encoded size is about 33% larger than the file.

Example

A 6 KB icon becomes roughly an 8 KB Base64 string.

How to use this tool

  1. Choose an image.
  2. Copy the data URI, the HTML <img> tag or the CSS background code.
  3. Paste it into your project.

Frequently asked questions

Are my files uploaded to your server?

No. The tool works entirely inside your browser, so your files never leave your device.

Should I Base64 large images?

No. It makes files bigger and stops browser caching. Use it only for very small images.

Is there a file size limit in the Image to Base64?

Because the Image to Base64 runs on your own device, the limit depends on your browser and memory. Files up to about 30–100 MB usually work well on a computer; very large files may be slow on older phones.