Skip to content

Image to Base64

Convert an image to a Base64 data URI for inline embedding — and decode it back.

How to use the Image to Base64

  1. Drop or choose an image.

  2. Copy the data URI or snippet.

  3. Paste it into your code.

Image to Base64 data URI

A data URI embeds an image directly in HTML or CSS as a Base64 string, saving an HTTP request for tiny assets like icons. This tool converts an image you drop in into a ready-to-use data URI (and CSS/HTML snippets), and can preview a data URI back as an image — all without uploading anything.

Key features

  • Image → Base64 data URI
  • Ready-made <img> and CSS snippets
  • Decode a data URI back to a preview
  • Fully local — no upload

Frequently asked questions

When should I use data URIs?

For very small, rarely-changing images (icons, tiny logos). Large images are better served as separate files.

Is my image uploaded?

No — the image is read and encoded entirely in your browser.

Why is the Base64 bigger than the file?

Base64 adds about 33% overhead, which is the trade-off for inlining.