Generate
Convert Images to Base64 Online - Instant & Private
Encode any image into a Base64 data URI with one click. Perfect for inline icons, CSS backgrounds, and single-file HTML. Nothing is uploaded.
Drop your image here
or click to browse files
Your images never leave your device, everything happens right here in your browser.
How it works
Three seconds, one string.
- 01
Drop your image
JPG, PNG, WebP, GIF, or SVG up to 5MB. The data URI appears instantly.
- 02
Check the size
The tool shows the original size next to the encoded size, since Base64 grows about 33% larger.
- 03
Copy and use
One click copies the full data URI, ready to paste into HTML, CSS, or JSON.
Questions
Before you start.
What is a Base64 data URI?
A data URI embeds an image directly as text inside HTML, CSS, or JavaScript. Instead of a separate image file, the browser decodes the Base64 string on the fly. It is commonly used for small icons, logos, and inline background images.
When should I embed images as Base64?
Use it for small images under a few kilobytes, where saving an HTTP request matters more than cacheability. For larger images, a normal file is better: Base64 makes files about 33% larger and cannot be cached separately by the browser.
How do I use the generated string?
Paste it wherever a URL would go: as an img src, inside CSS as url(...), or in JSON payloads that require inline images. Use the Copy to clipboard button to grab the whole string.
Is my image uploaded?
No. The encoding uses the FileReader API entirely in your browser. Your image never leaves your device.