Category: Developer tools
Data URI Generator
Turn text or a file into a data: URI
Paste text or choose a file, set the media type, and get a data: URI you can inline into CSS, HTML or JSON. The file is read and encoded entirely in your browser and never leaves your device.
data:text/plain;base64,SGVsbG8sIHdvcmxkIQ==
Everything on this page is processed in your browser. Nothing is uploaded.
What this tool does
A data: URI embeds a file's bytes directly inside a URL, so a small icon or font can ship inside a stylesheet instead of as a separate request. This tool builds one from either typed text or a chosen file: files are always base64-encoded since raw bytes rarely survive percent-encoding, while text can be encoded either way. Nothing is uploaded — the file is read with the browser's own FileReader API and the encoding runs locally.
How to use it
- Choose text or a file as the source.
- Set the media type if the guessed one is not what you need.
- Copy the generated data: URI.
Privacy
This tool runs entirely in your browser. Your input is never uploaded, stored or shared — closing the tab removes it.
Frequently asked questions
- Is the file uploaded to a server?
- No. The file is read and encoded by your browser; nothing is sent anywhere.
- Why is a file always base64-encoded?
- Arbitrary binary bytes do not survive percent-encoding cleanly, so base64 is the reliable option for files. Plain text can use either.
- Is there a size limit?
- Only the practical one: very large data: URIs make the surrounding CSS or HTML heavier, so this works best for small assets like icons or short snippets.