Encode plain text to Base64 Data URI
Input
Hello, World!Example output
data:text/plain;charset=utf-8;base64,SGVsbG8sIFdvcmxkIQ==Encode plain text, SVG vectors, HTML snippets, and JSON data into standard RFC 2397 Data URIs, or decode existing data: URLs back to clean source text with complete client-side execution.
| RFC Specification | RFC 2397 (The 'data' URL scheme) |
|---|---|
| Payload Encodings | Base64 (binary safe) and URL Percent-Encoding (compact for SVGs) |
| Maximum Input | 2 MB |
| Execution Deadline | 2 s |
Input
Hello, World!Example output
data:text/plain;charset=utf-8;base64,SGVsbG8sIFdvcmxkIQ==Input
data:text/plain;charset=utf-8;base64,SGVsbG8sIFdvcmxkIQ==Example output
Hello, World!Base64 encoding increases file size by approximately 33%. For SVG vectors, percent-encoding (`base64: false`) retains readability, compresses better with Gzip/Brotli, and yields smaller CSS bundles.
Data URI generation and decoding are exact mathematical inverses. You can freely click the Swap button to toggle between encoded Data URIs and original plain text without losing data.
When using URL percent-encoding instead of Base64, characters like quotes, hash symbols (#), and parenthesis are properly escaped to prevent CSS url() parsing errors.
Base64 Encoder / Decoder
Encode UTF-8 text to standard or URL-safe Base64 and decode Base64 back to text.
URL Encoder / Decoder
Encode and decode URL components, query parameters, and special characters using RFC 3986 percent-encoding or form-urlencoded format.
HTTP Header Parser
Parse, analyze, and format raw HTTP request and response headers with security, caching, and CORS diagnostics.
URL Parser & Inspector
Decompose, inspect, and analyze URLs into protocol, host, port, path segments, query parameters, and hash fragments.
A Data URI is a uniform resource identifier scheme that allows content creators to embed small files, images, or documents directly inline within web pages or stylesheets rather than referencing external files.
Data URIs are ideal for tiny icons, SVGs in CSS background properties, small fonts, or offline single-file HTML documents to eliminate separate HTTP round-trip requests.
While modern browsers support Data URIs of tens of megabytes, practical performance best practices recommend keeping inline Data URIs under 10KB to avoid inflating stylesheet parse times.