Free · Private · In-Browser

Data URI Generator

Turn text into a copyable data URI with a chosen MIME type.

Output
 

Inline assets as data URIs

A data URI embeds content directly in a URL, letting you inline a small file or text with a chosen MIME type — handy for tiny images, fonts, or config that you want to ship without a separate request. This generator builds a copyable data URI from your text.

Inlining a small asset can shave an HTTP request, though it is best reserved for genuinely small payloads. Set the MIME type, paste your content, and copy the resulting data URI to drop into CSS, HTML, or a src attribute.

Size and privacy

Base64 adds roughly a third to a file's size, so data URIs suit only small assets before inlining hurts performance. The encoding runs in your browser.

Frequently asked questions

What is a data URI?

A way to embed a file directly in HTML or CSS as text, like data:text/plain;base64,..., instead of linking to a separate file.

Should I choose base64 or URL encoding?

Base64 works for anything. URL encoding is often shorter and more readable for text formats like SVG and plain text.

When should I avoid data URIs?

For large files. They make pages heavier and cannot be cached separately, so they suit small icons and snippets.

Take it further
Developer Tools

Practical utilities for everyday web development work.

Learn more