Image to Base64 Converter
Convert images (PNG, JPG, JPEG, WEBP, GIF, BMP, SVG) to Base64 encoded strings or Data URLs instantly. Safe, browser-based conversion with file size and dimension stats.
Click or Drag Image Here
Supports PNG, JPG, JPEG, WEBP, GIF, BMP, and SVG (Max 15MB)
Local Browser ProcessingAbout Image to Base64 Converter
This tool turns an image into Base64 text. Drop a PNG, JPG, WebP, GIF, BMP or SVG file of up to 15 MB and you get three ready-to-use outputs: a full data URL for use in an img tag, the raw Base64 string, and a CSS background-image line. It also shows the file name, type, size and dimensions.
Embedding an image as a data URL saves a separate request and is handy for tiny icons, email templates and single-file pages. Base64 makes the data about a third larger, and embedded images cannot be cached on their own, so it is best for small images. For large photos, a normal image file is usually better.
The conversion is done in your browser and your image is not uploaded.
Who uses it and when
Inline icons and logos
Embed a small image directly in HTML or CSS.
Email templates
Include a small graphic without hosting it.
APIs and JSON
Send an image as text.
Single-file pages
Keep a demo or report self-contained.
Why use this Image to Base64 Converter
Image to data URL, Base64 and CSS in one step.
Many formats
PNG, JPG, WebP, GIF, BMP and SVG.
Three outputs
Data URL, raw Base64 and CSS.
Not uploaded
Converted in your browser.
How it works
Add an image
Drop it in the box or click to choose it.
Pick an output
Data URL, Base64 or CSS.
Copy it
Paste it into your code.
Frequently asked questions
Why is the Base64 bigger than the file?
Base64 uses about 33% more space than the original.
What is the size limit?
15 MB, but embedding anything over a few tens of KB is not recommended.
Is my image uploaded?
No. It is converted in your browser.
Can I convert it back?
Yes, with our Base64 to Image tool.