All 127 tools

Image to Base64

Convert an image to a Base64 data URI and get ready-to-paste HTML <img> and CSS background code.

Runs on your device. Images are never uploaded.

or drop them here. Processed on your device; nothing is uploaded.

About this tool

Inlining small icons as data URIs saves a network request. For anything above a few kilobytes, a normal image file is usually faster.

Embedding small images directly in code

Converting an image to Base64 turns it into text that can be placed directly inside HTML, CSS, JSON or an email template as a data URI. The browser then displays the image without making a separate network request. For tiny icons, simple logos or small background patterns, that can make a page feel slightly faster and keeps everything in a single file, which is handy for prototypes, offline pages and email signatures.

The trade-off is size. Base64 text is roughly a third larger than the original file, and images embedded in HTML or CSS cannot be cached separately by the browser. If the same image appears on many pages, a normal image file is usually more efficient, because the browser downloads it once and reuses it. As a rough guide, inline only images of a few kilobytes and keep everything else as regular files.

This tool gives you the complete data URI, plus ready-made HTML img and CSS background snippets, each with its own copy button. If you need only the raw Base64 for JSON or an API, copy the data URI and remove everything up to and including the comma. Compress or resize the image first so the output stays as small as possible. SVG icons can often be embedded more efficiently as plain SVG markup rather than Base64. Some email clients block data URIs, so test any embedded images in the clients your readers use before sending a campaign. The conversion happens in your browser and the image is never uploaded, which keeps private graphics and unreleased designs on your own device.

How to use it

  1. Choose an image, or drop them onto the box.
  2. Adjust the settings. The preview and file size update straight away.
  3. Download the result.

Questions

Is Base64 bigger than the original image?

Yes, by about 33%, because every 3 bytes become 4 characters.

When should I inline images?

For tiny icons and placeholders under roughly 2–4 KB, or in HTML emails where external images are blocked.

Last reviewed 16 October 2026.