Loading…

How to use Data URI Generator

Paste your content, pick its MIME type, and choose base64 or URL-encoded output. Copy the resulting data: URI straight into your HTML src, CSS url() or JavaScript.

Frequently asked questions

When should I use URL-encoding vs base64?

URL-encoding is usually smaller for text-based content like SVG and keeps it human-readable; base64 is more robust for arbitrary/binary content and older parsers.

Why embed content as a data URI?

It inlines assets directly into HTML or CSS, removing a network request — great for small icons, SVGs and CSS backgrounds.

Which MIME type should I pick?

Match the content: image/svg+xml for SVG, text/css for stylesheets, text/html for markup, application/json for JSON, or text/plain for raw text.

More Encoders & Decoders

Base45 Encoder / Decoder
RFC 9285 Base45 encode & decode, as used in EU COVID QR certificates
Ascii85 Encoder / Decoder
Adobe Ascii85 (base85) encode & decode with z shortcut and <~ ~> delimiters
Z85 Encoder / Decoder
ZeroMQ Z85 (RFC 32) base85 encode & decode for 4-byte-aligned binary data
Base62 Encoder / Decoder
Compact 0-9A-Za-z Base62 encode & decode, ideal for short IDs and URLs
Base64 ↔ Hex Converter
Convert Base64 directly to hexadecimal and back without leaving your browser
Punycode / IDN Converter
RFC 3492 Punycode encode & decode for internationalized domain names (xn--)
ROT47 Cipher
ROT47 rotate all printable ASCII by 47 — symmetric encode & decode
ROT18 Cipher
ROT13 for letters plus ROT5 for digits — symmetric encode & decode
Numeric HTML Entities
Encode text to decimal/hex numeric HTML entities (&#NN;) and decode them back
URL Encode All Characters
Percent-encode every character as %XX — full-escape any string for URLs
Uuencode / Uudecode
Classic Unix uuencode & uudecode with begin/end wrapper for text payloads
XXencode / XXdecode
XXencode & XXdecode using the portable +-0-9A-Za-z alphabet

← View all Encoders & DecodersBrowse all 1,100+ tools →