IMAGE TO BASE64
Drop any image and get a Base64 data URI you can paste directly into HTML or CSS. Runs entirely in your browser — nothing is uploaded.
Drop an image here or click to browse
JPG, PNG, WebP, GIF, SVG, AVIF and more
How to convert an image to Base64
- 1
Drop an image onto the upload area or click to browse for a file.
- 2
The tool instantly converts it to a Base64 data URI and shows a preview.
- 3
Copy the full data URI (with the data:image/… prefix) for use in an <img> src or CSS background-image.
- 4
Or copy just the Base64 string if you need to embed it manually.
Questions
- What is a Base64 data URI?
- A data URI is a URL scheme that embeds the file's raw bytes directly in the string, encoded as Base64 text. A browser can load it as an image without making a network request — useful for small icons, placeholders, and email templates.
- Is my image uploaded to a server?
- No. Everything happens locally in your browser using the FileReader API — the image bytes never leave your device.
- Should I use this for large images?
- Base64 encoding inflates file size by about 33 %, and embedding large images as data URIs makes your HTML or CSS much heavier. It is best suited for small icons, logos, or backgrounds under roughly 10 KB. For larger images, serve them as separate files.
- What image formats are supported?
- Any format your browser can open: JPG, PNG, WebP, GIF, SVG, AVIF, BMP, ICO, and others. The resulting data URI will include the correct MIME type (e.g. data:image/png;base64,…).