Data URI Encoder
Encode text or SVG content as a data URI for CSS and HTML embedding
Data URIs (defined in RFC 2397) embed file content directly in HTML or CSS, eliminating an HTTP request. They are useful for small SVG icons in CSS backgrounds, inline HTML documents in iframes, and embedding JSON or configuration data. Base64 encoding is required for binary data but increases size by ~33%; URL encoding is more efficient for SVG and text content since it avoids the size overhead. Modern browsers support data URIs up to several megabytes.
Frequently Asked Questions
- A data URI (RFC 2397) embeds file content directly in a URL using the format data:[mediatype][;base64],<data>. It eliminates the need for a separate HTTP request.
Related Tools
Base64 EncoderEncode text and binary data as Base64Base32 EncoderEncode or decode Base32 per RFC 4648URL EncoderPercent-encode and decode URLsHash GeneratorGenerate MD5, SHA-1, and SHA-256 hashesHMAC GeneratorCreate HMAC signatures with a secret keyBcrypt GeneratorHash and verify passwords with bcryptPassword GeneratorStrong random passwords with strength indicatorPassphrase GeneratorGenerate memorable multi-word passphrases