Image to Base64
Turn a small image into a data URI you can paste into CSS or an HTML attribute. Useful for icons and placeholders where an extra request is not worth it.
Drop a file here
or click to choose from your device
Choose file
The file is base64 encoded as-is, without re-encoding, and downloaded as a text file.
How to use it
- Add an imageKeep it small: a data URI is about a third larger than the file.
- ConvertYou get the full data URI as a text file.
- Paste itUse it in a background-image or an img src.
When to use it
- An icon that should not cost a request.
- A placeholder image inside an email template.
- A tiny logo embedded in a single-file page.
Limits and honest notes
- The file is not re-encoded: the data URI is the exact bytes, base64 encoded.
- A large photo becomes an enormous string and slows the page. Use a file for anything over about 20 KB.
- The output is a .txt file containing the URI, not an image.
Privacy
Every tool decodes and encodes the file inside your browser. Nothing is uploaded, stored or logged, and there is no account to create. Open the network tab and check for yourself: there are no upload requests.
Questions
Is the image uploaded?
No. The conversion happens in your browser.
Why is the text so long?
Base64 uses four characters for every three bytes, plus a prefix.
Can I use it in CSS?
Yes: background-image: url("data:image/png;base64,…");