Image to Base64
Turn an image into a Base64 string or ready-to-paste data URI for HTML, CSS or JSON.
Encode your image
Your image stays on your device.
Drop your image here, or browse files
PNG, JPG, WebP, GIF, BMP, AVIF or SVG · up to 20 MB
Output format
How to use it
- Choose an image up to 20 MB.
- Pick a format: a full data URI, the raw Base64 text, an HTML image tag or a CSS rule.
- Copy the text or download it as a file.
Examples
- Data URI:
data:image/png;base64,iVBORw0… - Use it as
<img src="data:…">to embed a small icon without a separate file.
Base64 makes data about 33% larger, so it suits small icons and logos better than large photos. The image is encoded as-is without re-compression.