Image to Base64 Converter
Convert an image file to a Base64-encoded data URI you can paste straight into CSS, HTML or JSON. Drag and drop or browse, then copy the raw Base64 string or the full data: URI. Nothing is uploaded anywhere.
Drop an image or click to browse. The file is read locally and converted to Base64 in your browser — copy the raw string for an API payload, or the full data: URI to drop directly into a src or background-image.
Image
Drop an image here, or click to browse
PNG, JPG, SVG, WebP, GIF — stays on your device
Frequently asked questions
Is my image uploaded to a server?
No — the file is read and encoded entirely in your browser using the File and FileReader APIs. It never leaves your device.
What's the difference between the raw Base64 and the data URI?
The data URI (data:image/png;base64,...) is ready to drop straight into an HTML src or CSS background-image. The raw Base64 string is the same payload without that prefix, for when you need to build the URI yourself.
Why is the encoded result bigger than my original file?
Base64 always adds roughly 33% overhead versus the raw binary — expected for any Base64-encoded payload, not specific to images.