How to use
- Drop or select an image (JPG, PNG, WebP, GIF or SVG).
- The image is encoded to a Base64 data URI instantly in your browser.
- Copy the raw data URI or a ready-made HTML <img> or CSS background snippet.
- Paste the Base64 code into your HTML, CSS or JSON.
Frequently asked questions
What image formats can I convert to Base64?
Any browser-readable image works — JPG, PNG, WebP, GIF, SVG, BMP and ICO. The file is read as-is and encoded to a Base64 data URI, so the output keeps its original format and MIME type.
Is my image uploaded to a server?
No. Encoding happens entirely in your browser using the FileReader API. Your image never leaves your device and nothing is uploaded, making this a fully private, offline-capable tool.
What exactly do I get as output?
You get the raw Base64 data URI, a copy-paste HTML <img> snippet, and a CSS background-image snippet. Each has its own Copy button so you can grab exactly the format you need.
Is there a file size limit?
There is no hard limit, but Base64 adds about 33% to a file's size, so a Base64 string is always larger than the original. Use it for small icons and assets; large images are best left as normal files.
Does converting to Base64 reduce image quality?
No. Base64 is a lossless text encoding of the exact bytes of your file. The decoded image is pixel-for-pixel identical to the original — only the file size changes.
When should I inline an image as Base64?
Base64 data URIs are great for tiny icons, logos or a single asset you want to embed directly in HTML or CSS to save an extra request. For larger or reused images, a normal file reference usually loads faster.
About this tool
Encode any image as a Base64 data URI you can paste straight into HTML, CSS or JSON. Get ready-made <img> and CSS background snippets — generated locally, no upload.