Image to Base64 converter
Encode images as Base64 data URIs, with ready-to-copy HTML and CSS snippets – or decode Base64 back to an image.
- Files never leave your device
- Instant, no waiting queue
- No watermark, no limits
How to use the Image to Base64 tool
- 1
Choose an image (or paste Base64 to decode).
- 2
Copy the data URI, HTML or CSS snippet.
- 3
Paste it into your code.
Encode images to Base64 data URIs
Convert PNG, JPG, SVG, GIF or WebP images to a Base64 string with ready-to-copy HTML img tags and CSS background code – or decode Base64 back to an image. Useful for emails, small icons, single-file HTML pages and APIs.
When to use Base64 images
Base64 works best for tiny images like icons and logos where saving an HTTP request matters. For large photos, a normal compressed file is better because Base64 is about 33% larger. Compress first with the image compressor and create site icons with the favicon generator.
Frequently asked questions
Is this tool free?
Yes, it is 100% free with no sign-up, no watermark and no daily limit.
Are my files uploaded to your server?
No. The tool runs entirely in your browser using JavaScript. Your files never leave your device, so the tool is private and works even on slow connections.
When should I use Base64 images?
For small icons and logos (under ~10 KB). Large images are better served as normal files.
How do I convert an image to Base64?
Upload the image and copy the Base64 string, HTML or CSS snippet from the output.
How do I convert Base64 back to an image?
Paste the Base64 string in decode mode and download the image.
Does Base64 increase file size?
Yes, by roughly one third, so use it mainly for small images.