इमेज से Base64
Image to Base64
Get a ready-to-paste data URL, CSS or HTML snippet for any image.
Runs in your browser · nothing uploaded
Encoding happens on your device; the image isn't uploaded. Data URLs work in HTML, CSS, JSON and email templates.
How to use it
- 01Add an image.
- 02Choose Data URL, Base64 only, CSS or HTML.
- 03Copy the text, or download it as a .txt file.
icon.png · 3.2 KB
data:image/png;base64,iVBORw0KGgo… (4,300 characters)
About this tool
Base64 turns a file into plain text so it can sit inside HTML, CSS, JSON or an email template. The image type in the data URL is read from the file itself. The text is about a third larger than the file, so it's best for small icons and logos; the tool warns above 100 KB.
Very long results aren't drawn on screen (that would freeze a phone), but copy and download still work.
The image is read in your browser and never uploaded. To go the other way, use Base64 to image.
हिंदी में मदद
किसी भी इमेज को Base64 डेटा URL, CSS या HTML कोड में बदलें। बड़ी फ़ाइलों पर चेतावनी मिलती है। इमेज कहीं अपलोड नहीं होती।
Questions
Why is the Base64 text bigger than the image?
Base64 uses 4 characters for every 3 bytes, so it is about 33% larger.
When should I embed an image as Base64?
For small icons, email templates or single-file pages. For photos, a normal image file loads faster.
Is the image uploaded?
No. It's encoded on your device.