Image to Base64 — Data-URI Encoder

Embed small images inline: paste a file, copy the data-URI for CSS background or , size-checked.

Quick answer: Free image→Base64: get data-URI strings for HTML/CSS/JSON with size comparison — files never uploaded.

original size
base64 size (+%)

How to use

  1. Choose an image.
  2. Copy the CSS or HTML snippet.
  3. Check the size delta below.

About this tool

Small icons and logos travel best inline. This encoder produces the data-URI (with correct MIME), shows the size-inflation honestly, and says when NOT to use it (big images).

FAQ

Uploaded?
Never — FileReader-local.
When to use Base64?
Small icons (<10KB), email HTML, single-file demos — big images should stay files.
Why is Base64 bigger?
~33% overhead — the tool shows exact before/after.
CSS syntax?
url(data:image/png;base64,…) provided ready-to-paste.
SVG?
Yes — text-safe MIME handled.
Decode back?
Paste the data-URI into any browser address bar to view.