Image to Base64
Convert an image to a Base64 data URI (with copy-ready <img> and CSS snippets), or decode a data URI back to an image. Free, in your browser, nothing uploaded.
Drop an image here, or click to choose
Encoded on your device · nothing is uploaded
your image never leaves your browser
How to convert an image to Base64
Keep "Image → Base64" selected and drop an image (or click to choose one). The data URI appears in a text box; click Copy data URI, or copy a ready-made <img> tag or CSS background snippet. Nothing is uploaded.
How to decode Base64 to an image
Switch to "Base64 → Image" and paste a data URI or base64 string into the box. The decoded image previews instantly, and a Download button saves it as a PNG. It all runs in your browser.
Questions
What is a Base64 data URI?
It's the whole image encoded as a text string beginning with data:image/…;base64,… You can paste it straight into an <img src> or a CSS url(), which embeds the image in your code so it loads without a separate HTTP request.
Do my images get uploaded?
No. Encoding uses the browser's FileReader and decoding is pure string work — both run entirely on your device, so your image is never sent anywhere.
Can I convert Base64 back to an image?
Yes. Switch to "Base64 → Image", paste a data URI (or a bare base64 string), preview the decoded image, and download it as a PNG.
When should I use a data URI instead of a normal image file?
Data URIs are great for tiny images — icons, small logos, inline SVGs — where saving an HTTP request matters. For large photos they bloat your HTML/CSS (Base64 is about a third larger than the file), so keep them for small assets.