Convert an image to Base64 or a data URI
Add an image and copy it as a data URI, plain Base64, a CSS rule or an HTML img tag.
Your images never leave your device. Everything happens in this browser tab; nothing is uploaded.
What it does
Encodes the original file bytes, unchanged. Base64 text is about a third larger than the file, so data URIs suit small icons and inline images, not big photos.
Limits
- Files over 10 MB are refused for Base64, because the text gets too large for a page to handle well.
- Input files up to 50 MB and 100 megapixels. Large images are slower, and many phone browsers fail above about 16 megapixels.
- Animated GIFs: only the first frame is used. HEIC/HEIF photos cannot be opened by browsers; export them as JPG first.
- Which formats can be read or written depends on your browser. The page only offers output formats your browser can actually produce.