Images — free, no signup
Base64 image encoder.
Embed a small icon directly in your CSS or HTML and save a network round trip.
Runs in your browser · Nothing uploaded · Nothing stored
Loading…
A data URI turns an image into a string of text you can paste straight into a stylesheet or an HTML attribute. The browser never makes a separate request for it, which removes a round trip — genuinely useful for tiny assets that appear on every page, like an inline icon, a bullet marker or a small logo in an email template.
The trade-off is size. Base64 encoding inflates the original by roughly 33%, and unlike a normal image file, an embedded one cannot be cached separately or reused across pages. Embed a 40 KB illustration and you have added 53 KB to every page that loads that stylesheet, permanently.
The practical rule: under about 4 KB, embedding usually wins. Above that, a normal file with proper caching wins. Email templates are the exception where the rules bend, because some clients block external images entirely and an embedded one is the only version that shows.
Worth knowing
- Keep it under 4 KB. Above that the extra weight outweighs the saved request.
- SVG icons are often smaller inlined as plain markup than as Base64 — try both before deciding.
- Embedded images cannot be cached independently, so never do this with anything large.
Questions
Frequently asked
When should I use Base64 instead of a normal image?
For very small assets used on every page, and for email templates where clients block external images. For anything else, a normal file with cache headers performs better.
Why is the encoded string bigger than my file?
Base64 represents binary data using only text characters, which costs about 33% extra. That is inherent to the encoding.
Does this work with SVG?
Yes, though inlining the SVG markup directly is usually smaller and lets you style it with CSS.
Related
More images tools
Beyond the tools
Want to know what else is holding your site back?
Our free website audit runs 26 checks across SEO, speed, content and security, and tells you in plain English what to fix first.
Run a free audit