Generate a Data URI ready to embed in HTML and CSS — PNG, JPEG, WebP, GIF, SVG, ICO
Drop your image below to instantly get a Base64 Data URI in the format data:image/png;base64,…. Paste it directly into an HTML src attribute, a CSS background-image rule, or an HTML email. Everything happens in your browser — no image is ever sent to a server.
Need the full tool with every Base64 option?
Open the Base64 tool →Paste a Data URI or raw Base64 below, then click Decode.
Once you have the Data URI copied, you can use it in several ways:
<img src="data:image/png;base64,iVBOR…" alt="Logo">background-image: url("data:image/png;base64,iVBOR…");<canvas> element.Tip: prefer Base64 for small assets (icons, logos under 5 KB). For large images, an external file is more efficient — Base64 increases file size by ~33%.
All formats supported by your browser: PNG, JPEG, WebP, GIF, SVG, ICO, AVIF, BMP. The Data URI will include the correct MIME type (e.g. data:image/webp;base64,…).
Paste the Data URI in a CSS rule: background-image: url("data:image/png;base64,…");. Extra quotes are optional if the string contains no spaces.
No. The conversion is done locally by your browser's FileReader API. The image never leaves your device.
There is no hard limit, but large images produce very long Data URIs. For images over 100 KB, consider an external file or pre-compressing with our image compressor.