PNG to data URI converter.
Embed a PNG in your HTML or CSS instead of linking it. Drop the file and copy the data URI, the img tag or the background-image line.
PNG to data URI converter.
Need the UI around it? With Pro, your AI agent builds the form, the result card and the rest of the page from a prompt.
Get ProHow it works
3 steps, no account. It runs in your browser and nothing is uploaded.
Drop a PNG
Drop a PNG, or any image, onto the pane.
Pick a snippet
Switch between the raw data URI, the HTML img tag and the CSS background-image line.
Copy or download
Copy it to the clipboard, or download it as a text file; the status line shows bytes in and characters out.
Related tools
More PNG tools. Every one free, in the browser.
Pricing
Build it with Pro
The tool is free. Pro adds 6,000+ blocks, premium templates and the MCP server, so your AI editor builds the product around it.
4.9/5 out of 5 · 150+ reviewsfrom 150+ founders and developers.
- Secure checkout via Stripe
- Code lives in your repo
- Keep what you've shipped if you cancel
- License terms
Questions and answers
Before you trust the result: what to know about the format, the limits, your data and the tools next to it.
A URL that carries the file itself: data:image/png;base64, followed by the image's bytes as Base64. Anywhere a URL to an image works, the data URI works too: an img src, a CSS url(), a JavaScript Image.
Small images that appear on every page: icons, a logo, a UI glyph. Each one embedded saves an HTTP request. Past 10 to 20 KB the arithmetic turns: the text is a third larger than the file, can't be cached on its own, and bloats the HTML or CSS it sits in.
Base64 writes three bytes as four characters, so the string is about 33 percent longer than the file, plus the short prefix. A 10 KB PNG becomes roughly 13.3 KB of text; the status line shows both numbers.
Yes, and it is one of the better uses. Many clients block remote images until the reader asks, while an inline data URI shows at once. Keep it small; some clients cap the size of a message's HTML.
Any image the browser can decode: PNG, JPG, WebP, GIF, AVIF, BMP, ICO and SVG, up to 100 MB. The tool is named for PNG because that is where people arrive from, but the input doesn't have to be one.
Three views: the raw data URI, an HTML img tag with the URI as its src, and a CSS background-image declaration. Switch between them and copy or download the one you need.
No. The file is read in your browser and every step runs there, on your device. The page makes no request with your image, so you can load it, go offline and keep working.
No. The PNG to data URI converter is free and opens without a sign-in, an account or an install.
Nothing. The PNG to data URI converter holds your input in the page's memory, so closing or reloading the tab clears it, and it saves nothing in this browser.
Up to 100 MB per file, the limit the tool states under its drop area. A larger file is refused with a plain message instead of being decoded.
No, it takes one file at a time. If you drop or choose several, only the first is used; run the tool again for the next one.
No. The text is made from the file's own bytes, unchanged, so EXIF and every other metadata field stay inside it. Nothing is re-encoded or resized.
About a third longer: Base64 writes every three bytes as four characters. The status line shows the exact character count and the overhead for your file.
Closest to the PNG to data URI converter: Base64 encoder, File to Base64, JPG to data URI converter, SVG to data URI converter. Each opens on its own page, free and in the browser.
The PNG to data URI converter is one of 47 in its group. The group's page, /tools/png, lists them all.
The tool is free. Its interface is built from shadcn.io's own components (Button, Input, Slider and the rest of the registry under /ui), which come in React, Vue, Svelte and Solid. Pro adds the blocks and templates for the product around it.
4.9 out of 5 from 150+ developers
Build the product around it
Every block, template and icon, installed by your AI agent in your theme. The tools stay free.
Get Pro





