Image to Base64
Turn an image into a data URI you can paste straight into CSS or HTML.
- Runs on your device — the file is never sent anywhere
- No sign-up, no watermarks, no daily quotas
- Free, with no limit on how often you use it
How it works
A data URI embeds an image directly in your source code rather than referencing a separate file. That removes one network request, which matters for tiny images that would otherwise cost a round trip each.
When it is worth it
Small icons, logos and single-colour graphics. Below roughly 2 KB, the saved request usually outweighs the cost. Above that, a normal file reference wins.
The size penalty
Base64 encodes three bytes as four characters, so a data URI is about 33% larger than the file. It also cannot be cached separately — it is re-downloaded with every copy of the stylesheet or page that contains it.
Where to paste it
Straight into a CSS url() or an img src attribute. The output already carries the correct media type prefix.
Image to Base64 — questions
Why is there a size limit?
Data URIs belong in source code, and very large ones bloat every page that includes them. The limit is 2 MB.
Does it work with SVG?
SVG is text, so it can be inlined directly without Base64, which is smaller.
Is my image uploaded?
No. Encoding happens in your browser.