Data URI Generator

How do I create a Data URI?

Drag your files into the upload box above to base64 encode them. Images, CSS, and Javascript will be automatically wrapped in appropriate tags with the correct data-uri, all other files will return the raw base64 enoded string for the file.

What is a Data URI?

A data URI is a URI that uses a base64 encoded string representation of a file. Since it is plain text it can be embedded directly in an HTML or Javascript file, reducing the number of HTTP requests your site makes and potentially improving performance. It’s also often more simple to manage a single file containing data URI’s than distributing multiple files.

Check out these links to learn more about Data URIs, when they might be useful, and the tradeoffs they make:

URI Encode Offline

Want to encode large files, have slow internet? If you’re on Linux or OSX, you can download a command-line version of the tool here: Download