UTILS.
100% in-browser

Text to Data URI

Wrap text, CSS, SVG, HTML or JSON into a data: URI.

output

About this tool

Turn text, markup or styles into a data: URI you can paste into HTML or CSS, using either Base64 or URL-encoding, all in your browser.

Frequently asked questions

Base64 or URL-encoded — which should I pick?
Base64 is the most compatible everywhere; URL-encoding keeps text readable and is often smaller for SVG and CSS.
Does it handle non-ASCII text?
Yes — text is encoded as UTF-8 before Base64, so emoji and accented characters round-trip correctly.

More tools