Data Uri Generator
Turn a piece of text into a data URI you can paste where a URL is expected.
- Runs in your browser No upload — everything runs on your device.
- No sign-up, no watermark Free to use, no account needed.
- Files never uploaded Nothing leaves your device.
- 5,400+ tools, one site File, unit and currency tools in one place.
Turn a piece of text into a data URI you can paste where a URL is expected. You type or paste the content and choose its MIME type — text/plain by default, or text/html, application/json and any other type/subtype pair — and the tool encodes the text as Base64 and builds the data URI around it. The result is a single line such as data:text/plain;base64,aGVsbG8= that browsers treat as the content itself, with no file to host and no request to make. Invalid MIME types are rejected with a clear message. Use it for tiny snippets, test fixtures, or embedding a short piece of content directly in a page or stylesheet. Everything runs in your browser: your text never leaves the device, nothing is uploaded or stored, and there is no account or sign-up.
How to use Data Uri Generator
- Paste your text type, paste (Ctrl+V) or drop a .txt file into the box above.
- Click Convert the tool runs entirely in your browser — nothing is uploaded.
- Read your results they appear below the tool as soon as the conversion finishes.
- Download the result save it for your records.
- Convert another clear the box and paste new text — no sign-up, no limits.
Format facts
| Input | Any plain text, or a .txt file (dropped or browsed). |
|---|---|
| Engine | Built-in browser engine |
| Category | Developer Tools |
Limits
- Browser processing has practical limits: files over 200 MB (or very long media) may be too large for your device. You will get an honest “too large” message, never a fake result.
- Pasted content is handled as plain text — formatting from documents is not preserved.
Frequently asked questions
What is a data URI?
A URL that carries its content with it instead of pointing at a file: data:, then the MIME type, then the content encoded as Base64. Browsers treat it as the content itself.
Which MIME type should I choose?
Match the content: text/plain for plain text, text/html for a snippet of HTML, application/json for JSON, image/svg+xml for SVG. The wrong type can make a browser handle the content incorrectly.
What is the result used for?
Small pieces of content embedded directly in a page or stylesheet, test fixtures, or anywhere a URL is expected but no file is available. Large content is better kept as a real file.
Does the text leave my browser?
No. The text is encoded on your device and never uploaded or stored.
Was this tool helpful?
Thanks — your feedback helps us improve this tool.
Sorry it didn’t help — tell us what went wrong and we’ll fix it.