Image to Base64 Converter
Upload an image to convert it to Base64 (data URI), or paste a Base64 string to convert it back into an image and download it. Everything runs locally in your browser with JavaScript: your image is never uploaded to a server, and it's gone as soon as you close or refresh this tab.
Image → Base64
Base64 → Image
Preview
Frequently asked questions
Is my image uploaded to a server?
No. The conversion happens entirely in your browser using JavaScript's FileReader API. The image never leaves your computer or gets sent to a server, and it isn't saved anywhere - it's gone as soon as you close or refresh this tab.
What is converting an image to Base64 used for?
It lets you embed images directly inside HTML, CSS or JSON as a "data URI" (for example, background-image: url(data:image/png;base64,...)), avoiding an extra HTTP request. It's common for small icons, emails, or pasting images into APIs that only accept text.
Why is the Base64 output bigger than the original image?
Base64 encodes every 3 bytes of binary data into 4 text characters, so the result is roughly 33% larger than the original file. That's why it's not a great fit for large images.
What image formats are supported?
Any format your browser can read as an image: PNG, JPG/JPEG, GIF, WEBP, SVG, BMP and ICO. The MIME type is detected automatically from the file.