Click to choose an image, or drag & drop
PNG, JPG, GIF, SVG, WebP — never uploaded
Encoded with the FileReader API entirely in your browser — your image is never uploaded.
Encode an image as a Base64 data URI, free. Base64 is a binary-to-text encoding (RFC 4648) that represents bytes using 64 safe ASCII characters. This tool reads an image you choose and outputs a Base64 data URI (data:image/...;base64,…) you can paste straight into HTML, CSS, or JSON — all in your browser, with the file never uploaded.
It turns an image into a self-contained data URI you can embed inline, removing one HTTP request for small assets like icons. 100% free, no registration, and complete privacy — everything runs locally in your browser, so your data never touches a server.
Pick or drop a PNG, JPG, GIF, SVG or WebP and get its Base64 data URI instantly.
Output includes the correct data:image/...;base64 prefix so it works directly in <img src>, CSS url(), or JSON.
The image is read locally with the FileReader API and never leaves your device — nothing is uploaded.
Unlimited encoding with no account, on desktop and mobile.
Choose or drop an image and the tool reads it locally and outputs a Base64 data URI. Copy the result and paste it into your HTML, CSS, or JSON.
No. The image is read in your browser with the FileReader API; the bytes never leave your device, so it's safe for private images.
Only for small assets (icons, tiny logos). Base64 is ~33% larger than the binary file and isn't cached separately, so inlining big images hurts performance — keep those as normal files.
Base64 encodes 3 bytes into 4 ASCII characters, so the text is about 33% larger than the original binary. That overhead is the trade-off for embedding binary data as text.
Yes. Use it as background: url(data:image/png;base64,…). The data URI already includes the MIME type the browser needs.