🖼️ Image Tools

💻 Image to Base64 Converter

Convert any image to a Base64 encoded string for embedding directly in HTML, CSS, or code. Also converts Base64 strings back to downloadable images. Free, instant, browser-based.

✏️ Image → Base64
💻
Drop image here or click to browse
Any image format — converts to Base64 string instantly
Preview
🔄 Base64 → Image
✨ Converted!
🔒 All conversion runs in your browser — nothing is uploaded
⚙️ How It Works
1
Upload your image
Drop any image — JPG, PNG, WebP, SVG. The file is read using FileReader.readAsDataURL() entirely in your browser.
2
Choose output format
Data URI (for img src), Raw Base64 (just the encoded string), CSS background-image, or ready-to-paste HTML img tag.
3
Copy and use
Click Copy to Clipboard and paste directly into your code. The reverse decoder also works — paste any Base64 string to preview and download as an image file.
❓ Frequently Asked Questions
What is Base64 image encoding used for?
How do I embed an image in HTML using Base64?
What is the difference between a Data URI and raw Base64?
Does Base64 encoding make images larger?
How do I convert Base64 back to an image?