Image to Base64

Encode an image as Base64 text to embed it directly in HTML, CSS, JSON or emails without a separate file.

Runs in your browser. Nothing is uploaded Free, no sign-up Works on mobile
Choose an image
or drag and drop, or paste with Ctrl+V

How to use Image to Base64

  1. Choose an image or paste one with Ctrl+V.
  2. Choose the output: data URI, raw Base64, CSS, HTML or Markdown.
  3. Copy the result.

Frequently asked questions

Why is the Base64 text larger than the image?

Base64 represents every 3 bytes as 4 text characters, so the encoded text is about 33% larger than the file.

When should I use data URIs?

For small icons and images in emails or single-file HTML. For large images, a normal file is faster because it can be cached separately.

Related tools

All Image Tools →