Image Tools

Image to Base64

Convert an image to a Base64 data URL for inline embedding in HTML, CSS or JSON.

Encoded locally. Base64 is ~33% larger than the file — best for small icons under ~10 KB.

About this tool

Small icons embedded as Base64 data URLs save an HTTP request — useful in emails, single-file HTML pages and CSS. Load an image and get its data URL (or raw Base64) ready to paste into src="…", url(…) or a JSON payload.

Base64 is ~33% larger than the binary file, so keep it for small images. Encoding is local; the image is never uploaded.

How to use

  1. Choose an image.
  2. Pick data-URL or raw Base64.
  3. Copy and paste it where you need it.

Frequently asked questions

For icons under ~10 KB in emails, inline CSS or single-file documents. For anything larger, a normal image file caches better.

Paste it into the src attribute: <img src="data:image/png;base64,…">. In CSS: background: url(data:…).

Base64 spells out every byte in text form, ~4 characters per 3 bytes — that's the cost of inlining.