Image to Base64
Convert an image to a Base64 Data URI with ready-to-paste HTML, CSS and Markdown — no upload, 100% in your browser.
Drop an image here or click to browse
🔒 Encoded in your browser — your image is never uploaded. Best for small images and icons; large files produce very long strings that can bloat your HTML/CSS.
Encode an image as a Base64 Data URI
Drop in an image and get its Base64 Data URI, plus copy-paste snippets for an HTML <img>, a
CSS background-image, and Markdown. Encoding happens in your browser, so the image is never uploaded.
When to use Data URIs
Inlining a small icon or logo as a Data URI removes an extra network request, which can speed up first paint. It works best for small assets — large images produce very long strings that bloat your HTML or CSS, so keep it to icons and tiny graphics.
Frequently asked questions
Is there a size limit?
No hard limit, but Base64 makes data ~33% larger, so inlining big images is not recommended. It is ideal for small icons.
Which formats work?
Any image your browser can read — PNG, JPG, WebP, GIF and SVG all work. The Data URI keeps the original type.
Is my image uploaded?
No. The file is read and encoded locally in your browser and never leaves your device.