XML Escape
Escape the five reserved XML characters, live as you type, in either direction.
Escapes the five reserved XML characters (&, <, >, ", ') to their entity form โ type in either field, both directions update live. Runs entirely in your browser.
Need the opposite? HTML Escape
What is XML Escape?
Type text containing &, <, >, ", or ' and see them escaped to their XML entity form instantly, needed whenever that text is going inside XML content or an attribute value. Type in either field, both directions update live. Skipping this step is a common source of malformed XML: an unescaped & or < in a text node breaks parsing entirely. Escaping happens live as you type, entirely in your browser.
XML Predefined Entities
| Character | Escaped Entity |
|---|---|
| & | & |
| < | < |
| > | > |
| " | " |
| ' | ' |
How to Use the XML Escape Tool
- 1
Type or Paste the Text: Enter any text, including the characters & < > " '.
- 2
Read the Escaped Result Instantly: The XML-safe entity form appears automatically as you type.
- 3
Copy the Result: Use the copy button to copy the escaped text for safe insertion into an XML document.
Why These Five Characters
XML uses < and > to delimit tags and & to introduce character references and entities, so a literal occurrence of any of these inside content or an attribute value would be parsed as markup instead of data, usually breaking the document entirely. " and ' are reserved specifically for delimiting attribute values, so a literal one inside a quoted attribute prematurely ends it. Unlike HTML, which defines a large set of named entities for symbols and accented characters, XML defines exactly these five predefined entities. It's a complete, fixed list rather than a common subset, which is why the table above covers all of it.
Frequently Asked Questions
Common questions about XML Escape.