Convert an Image to Base64 Online (Free)
Before CSS or JSON can embed an image inline, the image must become a Base64 data URI. Our tool encodes any image to plain Base64 or a ready-to-paste `data:image/...` string — entirely in your browser.
Try the free tool now
100% in your browser — no upload, no account, no watermark.
Open Image to Base64 OnlineWhy inline images need Base64
Emails, single-file HTML, API payloads and JSON webhooks that cannot host files expect the picture as text. Base64 encodes those bytes into safe ASCII, ready to paste.
Encode an image in three steps
- Open the Image to Base64 tool.
- Drop the image.
- Copy the plain Base64 or the full data URI with its MIME type, then paste it.
For email and CSS use the data URI form; for APIs that split the prefix, copy the raw Base64 string.
Only encode what must be inline
Base64 inflates a file by about 33%. Use inline encoding for small assets such as icons and email headers — and keep large photos as URLs. This tool tells you the original size versus the encoded length, so you know what you are committing to.
Tools we recommend
Frequently Asked Questions
What is the difference between Base64 and a data URI?
A data URI is `data:<type>;base64,<body>` — the whole usable string for HTML/CSS/emails. Plain Base64 is just the body, often needed by APIs.
Does Base64 increase file size?
By roughly 33%. Encoding 100KB of image produces about 133KB of text — fine for small icons, wasteful for photos.
Can I use Base64 images in email?
Yes — and it is the only way some clients show images reliably. Keep the original under ~50-100KB to avoid blocked or clipped messages.