Image to Base64 Converter
Convert PNG, JPG, GIF, WebP or SVG images into Base64 data URIs, ready to paste into HTML or CSS.
100% private — everything runs in your browser
How to Use
- 1
Drop an image or click to choose one from your device.
- 2
The Base64 data URI is generated instantly, along with img tag and CSS snippets.
- 3
Copy the snippet you need, or download the data URI as a text file.
Examples
Small icon
Input
logo.png · 12 KBOutput
data:image/png;base64,iVBORw0… (~16 KB of text)Inline CSS
Input
background.png · 4 KBOutput
background-image: url("data:image/png;base64,…");FAQ
Why is the Base64 version bigger?
Base64 encodes every 3 bytes as 4 characters, so the text is about 33% larger than the binary file. Gzip compression usually shrinks it back.
When should I inline an image?
For small icons, logos and UI graphics of a few kilobytes, where saving an HTTP request matters more than the extra page weight.
Is my image uploaded?
No. The file is read with the browser FileReader API and never leaves your device.