Convert any image into a Base64 data URI string ready to paste in your code
or drag and drop it here
Supported formats: JPG, PNG, WEBP, GIF, SVG
This tool converts any image into Base64 text in the form of a Data URI ready to paste directly into code, with a preview of the image before copying.
The tool also offers copying the text ready as a CSS "background-image" property directly.
Your image is converted to a Base64 string locally, never uploaded to a server.
Get the ready-to-use Base64 string the moment you drop in an image.
Encode as many images as you need without signing up.
The result appears as a full Data URI starting with "data:image/..." that can be pasted directly into the src attribute of an img element or into CSS code.
The first button copies the Base64 text alone, ready to paste anywhere, while the second button copies the same text ready as a full CSS property in the form "background-image: url(...);".
The tool accepts any file the browser recognizes as an image, meaning its type starts with image/, with no restriction to a specific format.
No, the tool currently processes one image at a time.
No, the image is read and converted to Base64 text entirely within the browser.