How to convert an image to Base64
- Drop or paste an image above.
- Choose the output format: data URI, raw Base64, an <img> tag or a CSS rule.
- Click Copy and paste it into your code.
When should you inline images as Base64?
Inlining small icons and logos (under ~10 KB) saves an HTTP request. For larger images, Base64 adds about 33% to the size and cannot be cached separately, so a normal image file is usually better.
Frequently asked questions
Are my images uploaded to a server?
No. ToolSmith processes every image locally in your browser. Your files are never uploaded, stored or seen by anyone — you can even disconnect from the internet after the page loads and the tool keeps working.
Why is the Base64 string bigger than my image?
Base64 represents every 3 bytes as 4 text characters, so encoded data is about 33% larger than the original file.
Can I convert Base64 back to an image?
Yes. Paste the string into the “Base64 → Image” box to preview it and download the image.