Double-encoded output
Running escape twice produces &.
Fix: Unescape first, then escape only once.
header • up to 320x100 / 728x90
Escape or unescape XML special characters and numeric entities with one click
Output will appear here...
content bottom • up to 300x250
sidebar • 160x600
Last reviewed:
XML (Extensible Markup Language) is a strict, tag-based format used for documents, SOAP APIs, RSS feeds, and many enterprise and publishing systems.
XML Escape / Unescape replaces the five reserved characters (& < > " ') with their named entities (& < > " ') or reverses the operation by decoding named entities plus numeric and hex references like { and 😀.
It's essential for XML, SVG, Atom, RSS, and SOAP workflows where raw user input must be safely embedded in element content or attribute values.
<tag attr="x&y">'ok'</tag>
<tag attr="x&y">'ok'</tag>
Running escape twice produces &amp;.
Fix: Unescape first, then escape only once.
Entities like are HTML-specific, not XML.
Fix: Use the HTML Entities converter for broader entity coverage.
The canonical five: &, <, >, ", '.
All five named, plus numeric ({) and hex ({) references.
Yes — " and ' are both produced for maximum safety.
No — it operates purely on text content.
No — the tool runs client-side.
Pair XML escape with JSON, HTML entities, and SQL helpers for complete escaping pipelines. You can also browse the full Encoders & Decoders category for more options.
Convert text to HTML entities or decode HTML entities back to text in a single bidirectional tool
Escape JSON special characters
Escape or unescape JavaScript string literals with backslash, quote, Unicode, and control-character handling
Escape or unescape C# string literals including \x, \u, and \U Unicode escape sequences
Round-trip Java string literals — escape quotes, backslashes, newlines, and Unicode sequences
Format and beautify XML documents online with proper indentation and line breaks. Validate XML syntax while formatting for clean, readable markup.
Wrap an XML document in a JSON string literal for safe embedding in payloads
Escape or unescape SQL string literals using standard single-quote doubling
Encode XML for URL parameters
Percent-encode or decode an XML payload for safe transmission in query strings and URLs
Encode text to HTML entities
Encode or decode HTML entities