Image to Base64
Convert an image to a Base64 data URL you can paste directly into CSS or HTML — entirely in your browser, the image is never uploaded anywhere.
Turn an image into a Base64 data URL that you can paste into HTML or CSS. It runs in your browser and the image is not uploaded.
How to use it
- Choose an image (up to 25 MB).
- Copy or download the data URL.
- Paste it where a file address would go, for example
<img src="data:image/png;base64,...">.
Good to know
The result starts with data:image/png;base64, (or the matching format) followed by the encoded picture, and the image keeps its original format. Base64 makes data about a third larger, and the browser cannot cache an embedded image separately from the page that holds it, so this suits small icons, HTML emails and self-contained demos, not photos. If you must embed something large, compress or resize it first with the Image Compressor.
See the guide and the Base64 entry.
FAQs
Does it work for any image format?
It encodes common image files as they are, including SVG, PNG, JPEG, WebP and GIF.