Image to Base64 Converter
Embed an image in HTML or CSS as a data URI.
Input
This tool runs entirely in your browser. The data you paste or load is never uploaded.
Result
Enter your input, then run the tool.
About this tool
Encodes an image as a Base64 data URI, ready to paste into a stylesheet or email. Small icons are the right candidate; the tool warns when the encoded string is large enough to hurt page weight.
How to use it
- Choose an image file.
- Wait for the encoded string and size warning.
- Copy the data URI or the ready-made CSS rule.
Frequently asked questions
When should I inline an image?
Only for tiny assets such as icons under a few kilobytes, and only when the extra request would cost more than the bytes.
Why is the Base64 version bigger?
Base64 adds roughly 33% overhead. HTTP compression can reduce it, but not to the original size.
Keep going
Related tools
Base64 to Image Converter
Decode a Base64 string or data URI into an image.
Base64 Encoder
Encode text or UTF-8 data as Base64, including URL-safe output.
Image Compressor
Shrink JPG, PNG and WebP images without an upload.
PNG to WebP Converter
Convert PNG images to modern WebP, with transparency kept.
JPG to WebP Converter
Turn JPEG photos into lighter WebP files.
WebP to PNG Converter
Convert WebP images to universally supported PNG.