Image to Base64
Get a data URI to paste straight into CSS or HTML.
About Image to Base64
A data URI lets you embed a small image directly in CSS, HTML or a JSON payload without a separate file request. Drop an image to get the Base64 string, ready to paste, along with the exact CSS and HTML snippets.
- Base64 is about 33% larger than the original file, so only inline images under a few kilobytes.
- SVG icons can be embedded as plain text instead, which is smaller than Base64.
- The output keeps the original format and MIME type.
How to use it
- 1Drop an image or paste one from the clipboard.
- 2Copy the raw Base64, the data URI, or a ready-made CSS or HTML snippet.
- 3Paste it into your code.
Questions
- When should I inline an image?
- For tiny icons, placeholders and single-use images where avoiding a network request matters more than the extra bytes.
- Is there a size limit?
- No hard limit, but anything over around 10 KB is usually better served as a file.
- Is my image uploaded?
- No. Everything runs in your browser, so your photos never leave your device.
More convert tools
HEIC to JPGTurn iPhone HEIC photos into JPGs that open anywhere.HEIC to PNGConvert iPhone HEIC photos to lossless PNG.WebP to JPGConvert WebP images into JPGs every app accepts.JPG to PNGConvert JPG photos to lossless PNG.PNG to JPGConvert PNG to JPG. Transparent areas become white.Image to WebPConvert JPG or PNG to WebP for faster web pages.Image to AVIFConvert images to AVIF, the smallest modern format.AVIF to JPGConvert AVIF files into universally readable JPGs.