✦ Free · No Upload · Browser-Based
Image to Base64 — Free Online Converter
Convert any image to a Base64 data URL for embedding in HTML, CSS, or JSON. Copy or download as .txt.
✓ 100% Free✓ No file uploads🔒 Private⚡ Instant
Drop your image here
All image formats supported
What is Base64 Image Encoding?
Base64 encodes binary image data as a text string, producing a "data URL" like data:image/jpeg;base64,/9j/4AAQ.... This lets you embed images directly into HTML, CSS, or JSON without a separate file — useful for email templates, icon embedding, and offline web pages.
1
Upload your image
Drop any image file. Smaller images produce shorter Base64 strings.
2
Convert
The image is rendered on Canvas and encoded as a Base64 data URL.
3
Copy or download
Click Copy to clipboard or Download as .txt — ready to paste into your code.
How to use Base64 in HTML
<img src="data:image/png;base64,YOUR_BASE64_STRING">
How to use Base64 in CSS
background-image: url('data:image/png;base64,YOUR_BASE64_STRING');
Base64 encoding increases file size by about 33%. A 100KB image produces a ~133KB Base64 string. For large images, hosting as a separate file is more efficient.