Image to Base64
Turn an image into a Base64 data URI for HTML or CSS.
Free
Files stay on your device
Choose an imageany image type · stays on your device
About this tool
Image to Base64 turns a picture into text that you can paste straight into HTML, CSS or JSON. This is useful for small icons and email templates. Your files are processed on your own device. Nothing is uploaded to our servers.
How to use Image to Base64
- Choose an image.
- Pick the output: data URI, raw Base64, HTML or CSS.
- Copy the code.
Questions people ask
When should I use Base64 images?
Use them for very small images like icons, where saving an extra network request matters. Large images grow about 33% bigger as Base64.
What is a data URI?
A data URI is a Base64 string with a prefix such as “data:image/png;base64,” that browsers can display directly.
Is there a size limit?
No hard limit, but strings for images over 1 MB become very long and slow to paste.
More image tools
See all 26 →
Background RemoverRemove the background from a photo with AI.
Image to Text (OCR)Extract text from photos, scans and screenshots.
Rotate & Flip ImageRotate by 90° or any angle, and mirror images.
Blur ImageBlur or pixelate faces, plates and text in a photo.
Add Watermark to ImageStamp text or a logo on many photos at once.
Add Text to ImageWrite captions and titles on any picture.