Image to Base64 (Data URI Generator)
Image to Base64 encodes a picture into a data URI you can paste into CSS or HTML. Base64 inflates size by about 33%, so it only pays off for very small assets where removing a request beats the extra bytes.
Runs locally · files stay on device · works offline
How it works in 4 steps
- 1
Pick or drop
Select or drag files into the card — loaded directly into local memory.
- 2
Set options
Adjust target KB, format, dimensions or filters with instant feedback.
- 3
Process locally
Canvas, WebAssembly, or Web Crypto completes the job on your device.
- 4
Save result
Download directly; close the tab to clear everything from memory.
When to use this
| Scenario | Recommended | Why |
|---|---|---|
| A tiny icon needs zero extra requests | Image to Base64 | Inlining beats a round trip under ~2KB |
| An email template must be self-contained | Image to Base64 | No external asset to block |
| The image is a hero banner | Keep it a file | Base64 adds 33% and blocks HTML parsing |
Privacy & Offline Guarantee
Ready to use with zero installation or login. Once loaded once, core dependencies cache locally so the tool works offline.
FAQ
When is inlining worth it?
Roughly under 2KB, and only for critical above-the-fold assets. Beyond that the 33% size penalty and the loss of caching cost more than the request saved.
Why is the Base64 string bigger than the file?
Base64 maps 3 bytes to 4 characters, a fixed 33% overhead. Compression cannot recover it.
Is my image uploaded?
No — encoding uses FileReader locally.
Something failed, or you wish this tool also did something else? Tell me →
Related Tools
Ready to process your files privately?
Back to tool ↑