Image to Base64 Converter
Drop an image to get its Base64 string, a data URI, or a ready-to-paste HTML or CSS snippet. The file stays on your device.
Questions people ask
When should I inline an image as Base64?
For small images — icons and tiny backgrounds under roughly 2–4 KB — a data URI saves an HTTP request. For anything larger it hurts: Base64 is a third bigger than the file, cannot be cached separately and blocks rendering of the CSS or HTML it sits in.
Is my image uploaded?
No. The file is read with the browser’s FileReader API and encoded on your device. Nothing is sent anywhere.
Should I Base64-encode SVGs?
Usually not. SVG is already text, so a URL-encoded data URI (data:image/svg+xml,…) is smaller than Base64. This tool offers both for SVG files.