Build a data URI from an image
Nothing found — try another word.
This tool has no parameters — the result is ready as is.
Builds a full data-uri (data:image/png;base64,…) for embedding in HTML/CSS.
Nothing found — try another word.
This tool has no parameters — the result is ready as is.
Build a data URI takes an image and produces the complete string that lets it live inside a text file: the data: prefix, the media type, the base64 marker, a comma and the encoded picture — ready to paste into a background-image declaration, an HTML src attribute, a JSON config or an email template, with a button that copies the whole value. The encoding always produces a PNG, whatever you loaded, because the pixels are re-encoded through a canvas: a JPG or WebP comes back as PNG bytes inside the data URI. Everything runs in your browser.
The Base64 output is only the payload. The data URI adds the data: prefix, the image/png media type and the comma, which an attribute expects as a whole. The data URI to PNG page here does the reverse.
Yes, and that is worth knowing: the pixels are encoded again as a PNG, so the data URI always says image/png and carries PNG data.
Base64 stores six bits per character, so it costs about a third more characters than the raw bytes. It is a transport format, not a compression one.
No. The image is read, encoded and displayed in your browser tab, and no copy is stored - which matters because a data URI contains the whole picture.