PNG to data URI in one step
The data URI tab opens first, ready for an src attribute or a CSS url(). Transparency and colour profile stay exactly as in your file.
Encoder
Drop a PNG and copy it as Base64, a data URI, an <img> tag or a CSS background. Transparency is kept. Free, in your browser.
Encoding and decoding happen on your device. Only the optional AI extras upload an image, and it is deleted after 24 hours.
Drop images here, or paste with Ctrl+V
PNG, JPG, GIF, WebP, SVG, AVIF, BMP or ICO · up to 25.0 MB each · 20 at a time
Runs in your browser. Nothing is uploaded.
PNGs keep their transparency. The data URI tab is selected.
Runs in your browser. Nothing is uploaded.
The data URI tab opens first, ready for an src attribute or a CSS url(). Transparency and colour profile stay exactly as in your file.
Each result shows its length and a verdict: under 10 KB inline it, over 32 KB keep it as a file.
PNG screenshots and photos get large. The shrink panel re-encodes to WebP or JPEG at a target size before you copy.
Drop up to 20 PNGs at once and copy each one. Asset Pipeline adds one-click export of up to 200 files as a ZIP, CSV or CSS sheet.
FAQ
Drop the PNG above and copy the result. It all happens in your browser in a moment.
Yes. Base64 is the same bytes written as text, so transparency and every pixel stay the same.
A data URI is the Base64 with a data:image/png;base64, prefix, so browsers can use it as an image address.
Pick the CSS tab and paste the rule into your stylesheet. It sets background-image to the data URI.
No. The conversion runs on your device; nothing is sent anywhere.
Last updated: