Embedding images as text
A Base64 data URI is an image written as text. Paste it into HTML or CSS and the image loads with the page, with no separate file request.
When it helps
- Tiny icons and logos in a single HTML file
- Email signatures and templates that must stay self-contained
- Quick demos where you do not want extra files
When to avoid it
Base64 makes a file about a third larger and cannot be cached on its own, so keep it for small images only.
Frequently asked questions
Is my image uploaded?
No, the encoding happens in your browser.
How do I use the result?
Paste it as the src of an img tag or in a CSS background, prefixed with data:image/...
Is there a size limit?
Very large images produce very long text that can slow a page. Keep it to small icons.