Image to Base64
About this tool
Small icons in HTML or CSS often use data URLs. Pick an image to encode, or paste Base64 to preview it.
Features
- File to Data URL
- Data URL back to a preview
- Stays in the browser; the file is not uploaded
How to use
- Choose an image.
- Copy the data URL or raw Base64.
- Paste existing Base64 to preview.
When to use it
- A tiny icon belongs in CSS or HTML email
- You need to see which image a Data URL is
- A demo should not depend on a CDN
Examples
- A PNG becomes a data:image/png;base64,... string.
- Pasting a full Data URL shows the image again.
FAQ
Should large photos be Base64?
No. Markup size grows quickly. Use static files for photos.
Is the image uploaded?
No. Conversion is local.
Back to Image Tools Hub
Guides