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 generate a data: URI for CSS, HTML or JSON locally in your browser.
data:text/plain;base64,SGVsbG8sIHdvcmxkIQ==
Everything on this page is processed in your browser. Nothing is uploaded.
What this tool does
This data URI generator turns pasted text or a selected local file into a data: URI you can inline in CSS, HTML or JSON. You can set the media type when the guessed value is not what you need. Files are read with the browser's FileReader API and encoded locally; file input is base64-encoded, while text can be encoded either way. The tool does not upload inputs, files, settings or results, and it does not fetch remote URLs, process batches, compress or edit images, manage accounts, keep cloud history or store anything on a server.
How to use it
- Choose text or a file as the source so the tool knows what to encode.
- Review or set the media type before generating the data: URI.
- Copy the generated data: URI and use it only where inline text or small assets make sense.
Privacy
This tool runs entirely in your browser. Your input is never uploaded, stored or shared — closing the tab removes it.
Frequently asked questions
- How do I generate a data URI from text or a file?
- Choose text or a file, set the media type if needed, then copy the generated data: URI. File reading and encoding happen in your browser.
- When should I use Base64 instead of percent encoding?
- This tool base64-encodes file input because raw bytes rarely survive percent encoding cleanly. Text can be encoded either way.
- What media type should I use in the data URI?
- Use the guessed media type when it matches your target, or set the MIME type your CSS, HTML or JSON consumer expects before generating.
- Is my input, file, or generated data URI uploaded?
- No. Inputs, files, settings and results stay in the browser and are not uploaded to LocalTools.
- What does this data URI generator not support?
- It does not fetch remote image URLs, convert batches, compress or edit images, manage accounts, keep cloud history, store server-side data or provide unlisted integrations.