Loading…

How to use XML Encoder / Decoder

Type or paste your text, and the tool encodes or decodes XML special characters like < and & safely.

Frequently asked questions

Which characters must be escaped in XML?

& → &amp;, < → &lt;, > → &gt;, " → &quot;, ' → &apos;

Is XML encoding the same as HTML encoding?

Almost — XML uses &apos; while HTML prefers &#39;. XML requires stricter well-formedness.

When is XML encoding needed?

When embedding user-provided text inside XML tags or attributes to prevent XML injection attacks.

More Encoders & Decoders

Base64URL Encoder / Decoder
URL-safe Base64 (-_ instead of +/, no padding) encode & decode
Base58 Encoder / Decoder
Bitcoin-alphabet Base58 encode & decode with leading-zero support
Hex Dump Viewer
View text as a hexdump -C style offset, hex and ASCII dump
Data URI Generator
Convert text, SVG, CSS or HTML into a data: URI (base64 or URL-encoded)
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

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