Data Uri Generator

Turn a piece of text into a data URI you can paste where a URL is expected.

Runs in your browser — nothing is uploaded

Nothing is uploaded. Counting happens on your device.

Drop a .txt file here Tap to choose a .txt file

or browse your device — you can also paste (Ctrl+V)

Your camera and gallery open from the file picker

One file at a time. Files over 200 MB may be too large for browser processing.

    Your result will appear here.

    Free, no account, no sign-up. Nothing is uploaded. Everything runs on your device.

    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

    1. Paste your text type, paste (Ctrl+V) or drop a .txt file into the box above.
    2. Click Convert the tool runs entirely in your browser — nothing is uploaded.
    3. Read your results they appear below the tool as soon as the conversion finishes.
    4. Download the result save it for your records.
    5. Convert another clear the box and paste new text — no sign-up, no limits.

    Format facts

    InputAny plain text, or a .txt file (dropped or browsed).
    EngineBuilt-in browser engine
    CategoryDeveloper 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.