How to convert an image to Base64
- Choose an image or drop it on the page.
- Pick the output, such as Data URL.
- Copy the text or download it.
About this tool
Base64 turns a picture into plain text, so it can sit directly inside HTML, CSS or JSON. It's handy for small icons and email templates. Choose an image, pick the form you need, and copy the result. Everything runs in your browser.
Common questions
When should I use Base64 for images?
For small icons and logos, where one less file to load is worth it. The text is about a third larger than the image, so large pictures are usually better as normal files.
What's the difference between Base64 and a data URL?
A data URL is the Base64 text with a label in front saying what it is, such as data:image/png;base64. Browsers need that label to show it.
Is my image uploaded?
No. It's read by your browser and stays on your device.
Is it free to use?
Yes. There's no sign-up, and you can use it as often as you like.
Is my text uploaded anywhere?
No. This tool runs inside your browser, so what you enter stays on your device.
Do I need to install anything?
No. It works in your browser on a computer or a phone.