Convert Text to Data URI (Base64)
Convert text (HTML, SVG, CSS…) into a base64-encoded data URI.
🔒 100% client-side — no data sent
Convert any text into a base64-encoded data URI, ready to embed in HTML or CSS. Perfect for inlining content without external files. Conversion happens entirely in your browser, with no data sent anywhere.
What is it for?
- ▸ Inline an SVG or text directly in HTML
- ▸ Avoid a network request for a small file
- ▸ Generate a data URI for a stylesheet
- ▸ Quickly encode text to base64
FAQ
What is a data URI?
It's a URL that embeds the content directly, often base64-encoded.
Can I choose the MIME type?
Yes, the tool offers several MIME types (text, HTML, SVG, CSS, JSON).
Is my text transmitted online?
No, encoding is fully local.
Related tools
Basic Auth · header generator Generate the HTTP Authorization: Basic header from a username and password. Bearer · Authorization header Generate the HTTP Authorization: Bearer header and extract a token from a header. Code playground (JS/TS/Python/PHP) Run JavaScript, TypeScript, Python or PHP and see the result instantly, 100% in your browser. Color shades Generate the tints and shades of a color for your palette, in your browser. Cookie · parser Break down a Cookie or Set-Cookie header into readable key/value pairs. CORS headers · builder Generate CORS headers (Access-Control-Allow-*) for your server.