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.

The result will appear here…
or press Ctrl+Enter

Everything runs in your browser. Your data is never sent to our servers.

728 × 90Ad Space AvailablePlace your ad here

Example

Example Input

<note id="1">A & B</note>

Example Output

&lt;note id=&quot;1&quot;&gt;A &amp; B&lt;/note&gt;

How to Use

  1. 1Choose Escape or Unescape mode at the top.
  2. 2Type or paste your text into the Input field.
  3. 3Click the button (or press Ctrl+Enter) to process. The result appears in the Output field.
  4. 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 (&lt;, &gt;, &amp;, &apos;, &quot;). 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.

Related Tools

Related Categories