CleverCat mascot: a cat engineer with a hard hatCleverCat.CC

Home / Image tools / Image to Base64

Image to Base64

A data URL puts the image inside the markup, so the page makes no extra request for it. Choose a file and copy the string — it never leaves your device, which matters for anything unpublished.

How to use it

  1. Choose an image file.
  2. Check the preview and the size comparison.
  3. Copy the data URL into your src or your CSS.

Examples

Questions people ask

When is this a bad idea?

For anything over a few kilobytes. Embedded images cannot be cached separately, so a large data URL is re-downloaded with every page and inflates the HTML. Keep it for small icons and one-off graphics.

Does it work with SVG?

Yes, and for SVG a data URL is often the better choice because the file is small and text-based. Encoding also sidesteps escaping problems when embedding SVG directly in CSS.

Related tools

Updated: 2026-08-07