Convert images to Base64 for inlining in HTML, CSS or JSON. Drop one image or a whole folder, choose the output — data URI, raw Base64, CSS background-image, an img tag or JSON — and copy each result or download them all as a ZIP. Going the other way, paste a Base64 data URI to see the image and save it. It's free, runs in your browser, and your images never leave your device.
| Image size | Recommendation |
|---|---|
| Under 2 KB | Inline — saves a request |
| 2–10 KB | Inline only if used once on a critical page |
| Over 10 KB | Keep as a file — it can be cached |
| Repeated across pages | Keep as a file |
Drop it here. The data URI appears instantly; choose another format from the menu if you need raw Base64, CSS or an img tag.
Yes, by about a third. It suits small images under a few kilobytes; larger ones are better as normal files.
PNG, JPG, GIF, WebP, AVIF, SVG, ICO and BMP — the file's own type is kept.
Yes. Drop several files or a folder and download all the results as a ZIP.
No. They're encoded in your browser.
Each image is read with the File API as raw bytes and Base64-encoded in chunks, so large files don't hit the argument limits of a single String.fromCharCode call. The data URI uses the file's own media type, so PNG, JPEG, GIF, WebP, AVIF, ICO and SVG all render when pasted back. Output can be the full data URI, the raw Base64 payload, a CSS background-image rule, an HTML img tag or a JSON object with name and type, and many images can be converted together and downloaded as a ZIP of text files. The original and encoded sizes are shown side by side: Base64 adds about a third, and an inlined image can't be cached separately from the page or stylesheet that contains it, so a warning appears for anything over 10 KB, where a normal image file is usually the better choice. The decode tab takes a Base64 data URI, previews the image, and saves it with the right extension. Nothing is uploaded.