XML Escape & Unescape
Escape XML special characters (< > & ' ") so documents stay valid. This tool does both escape and unescape on one page — just pick a mode, paste your text, and click. Everything runs on your device, nothing is sent to a server.
Everything runs in your browser. Your data is never sent to our servers.
Example
Example Input
<note id="1">A & B</note>
Example Output
<note id="1">A & B</note>
How to Use
- 1Choose Escape or Unescape mode at the top.
- 2Type or paste your text into the Input field.
- 3Click the button (or press Ctrl+Enter) to process. The result appears in the Output field.
- 4Click Copy to copy the result, or "Swap input/output" to quickly reverse the operation.
About XML
XML Escape turns the five characters with special meaning in XML — <, >, &, ', and " — into their corresponding entities (<, >, &, ', "). This keeps an XML document well-formed.
How it works: each special character is mapped to its entity on escape, and restored on unescape. This tool also understands numeric entities (&#NN; / &#xNN;).
XML Escape is needed when inserting free text into XML elements or attributes — e.g. in config files, SOAP, RSS, or SVG — so the parser doesn't misread the structure.
FAQ
Can this XML tool both escape and unescape?
Yes. This is a single page with a toggle — use Escape mode to transform text, and Unescape mode to reverse it. No need for two separate pages.
Is my data sent to a server?
No. XML is processed entirely in your browser. The text you enter never leaves your device.