Image to Base64 Converter
Convert an image to a Base64 data URI and get ready-to-paste HTML and CSS snippets — for icons, emails and inline assets.
Your image is converted entirely in your browser and never uploaded.
This tool is temporarily unavailable.
Please check back later.
How to use this tool
- 1Choose an image: PNG, JPG, GIF, WebP, SVG or ICO.
- 2Pick the output you need: data URI, raw Base64, an HTML <img> tag or a CSS background rule.
- 3Copy it and paste it into your code.
Features
- Four ready-to-paste formats: data URI, Base64 only, HTML and CSS.
- Shows the original size and the Base64 size side by side.
- Warns when an image is too large to be worth inlining.
- Works with SVG icons and favicons as well as photos.
Privacy
The image is read and converted entirely in your browser. Nothing is uploaded.
Frequently asked questions
When should I embed an image as Base64?
For small icons, logos and placeholders (under ~10 KB), in HTML emails, or when a single self-contained file is required. Larger images are better as normal files the browser can cache.
Why is the Base64 version bigger?
Base64 encodes every 3 bytes as 4 text characters, so the output is about 33% larger than the original file.
Is SVG better as Base64 or as text?
For CSS, a URL-encoded SVG is often smaller than Base64. Base64 is the most compatible choice and always works.
How do I turn Base64 back into an image?
Paste the data URI into your browser address bar, or decode the text with the Base64 Decoder.