Choose a MIME type and encoding, then generate a data URI from text.
The Data URI Generator turns text into a data: URI that carries its content in the string. You can use suitable data URIs in an HTML src attribute or a CSS url() value.
A data URI includes a MIME type, an optional encoding marker such as base64, and the encoded content. Select the type that matches your text rather than assuming the generator can identify arbitrary file bytes.
Hellodata:text/plain;base64,SGVsbG8=Here text/plain is the MIME type and base64 identifies the encoding. The value SGVsbG8= represents Hello. An image data URI might instead use image/png, but its payload must contain the actual encoded image bytes, not just an image filename.
The interface accepts text and does not show a file upload. For a CSS background, use an appropriate URI in background: url(...). Check that the destination accepts embedded data.
The Base64 form follows data:[mimetype];base64,[data]. Use it in a suitable src or url() context, with the quoting and escaping that context requires.
Base64 increases the encoded size by roughly a third. Inlined data is part of its containing document rather than a separately cached asset. That can suit small assets or self-contained prototypes, but it does not guarantee faster pages. Check your browser, email client, and site policy before relying on an embedded asset.
For byte notation, see the ASCII to Hex Converter. For a separate encryption workflow, see AES Encryption. A data URI or Base64 encoding does not encrypt its content.
How to Use Data URI Generator - Encode Text for HTML and CSS
Select the MIME Type that matches your source text. The page does not provide a file upload.
Paste content into Input Text and set Use Base64 encoding for the format your destination expects.
Check Data URI Output, then use Copy. Test the value in its actual HTML or CSS context.
Choose a MIME type and encoding, then generate a data URI from text.
Tool Use:
98Added:
Sep 11, 2026Type:
Free ToolPrivacy:
Client SideByte array to string converter for decimal UTF-8 bytes. Paste comma-separated or whitespace-separated values and review the decoded text.