KOEN

Image to Base64 Converter

IMAGE · BASE64 · DATA URI

Convert images to Base64 data URIs, CSS backgrounds or img tags, and decode Base64 back to a viewable, downloadable image. Everything runs in your browser.

Your files are never uploaded. Encoding and decoding both happen right here in your browser.

output.txt 0 chars
Load an image and the code appears here.

When should I use it? It's great for embedding small images of a few KB, like icons, tiny logos or loading spinners, into HTML, CSS or email templates without a separate file. Base64 is about 33% larger than the original and can't be cached on its own, so it's not recommended for large photos.

HOW TO

How to use

  1. Choose Image → Base64, then drop an image, click to pick one, or paste a copied image with Ctrl/⌘+V.
  2. Pick the output: Data URI, Base64 only, CSS background or HTML <img>. Turn on 2x to halve the CSS size for retina images.
  3. Check how much the size grows, then press Copy.
  4. To go the other way, switch to Base64 → Image, paste the code, preview it and download the image.
PAIRS WELL WITH

Pairs well with

FAQ

FAQ

Are my images uploaded?

No. Encoding and decoding both happen in your browser, and no image or code is sent to a server.

Why is the Base64 bigger than the original?

Base64 represents every 3 bytes with 4 text characters, so it's about 33% larger. It's best for small images of a few KB, like icons and logos, where saving an extra request is worth it.

My Base64 won't decode. What's wrong?

Line breaks, spaces and URL-safe characters (-, _) are cleaned up automatically. If it still fails, part of the string may be missing, or the data may not be an image.