Inline small assets
Embedding icons and small images as data URIs saves an HTTP request and keeps a single HTML or CSS file self-contained.
Encode any image as a Base64 string or data URI, ready to paste into HTML, CSS, JSON or email templates. Copy the snippet you need with one click.
Your images are processed on your device and are never uploaded.
Loading engine…
Add an image.
Choose the output: data URI, raw Base64, an HTML img tag or a CSS background.
Copy the result to your clipboard or download it as a text file.
Embedding icons and small images as data URIs saves an HTTP request and keeps a single HTML or CSS file self-contained.
Base64 is about a third larger than the original file. It is best for images of a few kilobytes; compress larger images first.
A data URI is a Base64 string prefixed with its MIME type, like data:image/png;base64,…, that browsers can use anywhere a URL is expected.
Very large strings can slow down your editor. The tool warns when the output is over one megabyte.
No. Encoding happens in your browser.