Introduction
Base64 encoding turns an image into a text string that can be embedded directly in HTML, CSS, or JavaScript. This is useful for small icons, inline SVGs, and email templates.
This tool converts any image into a Base64 data URI instantly. Copy the result with one click.
Output: data:image/png;base64,... · Size limit: 10MB
How to Use
- Upload your image
Drag and drop or click to browse. - Wait for conversion
The tool encodes the image automatically. - Copy the Base64 string
Click the copy button or select manually. - Paste in your code
Use it in HTML/CSS:background-image: url(data:image/...)
Size warning: Base64 strings are ~33% larger than the original file. Only use for images under 50KB.
About This Tool
The tool reads the image using the browser's FileReader API and produces a data:image/...;base64,... string. It works offline and supports JPEG, PNG, GIF, WebP, and SVG.
Common Use Cases
- Inline small icons in HTML to avoid HTTP requests
- Email templates that cannot load external images
- Embedding images in JSON payloads
- CSS sprites and small backgrounds
Privacy
All conversion happens in your browser. No file is transmitted.