Runs in your browser · Last updated 7 September 2026
Free XML Escape / Unescape
Free XML escape and unescape. amp, lt, gt, quot, apos — text or attribute mode. Browser tool — nothing is uploaded.
Escaped
<item id="x">Tom & Jerry</item>
Unescaped (if the box is already entities)
<item id="x">Tom & Jerry</item>
How to use this tool
- Paste XML or text.
- Toggle attribute mode if the string is an attribute value.
- Copy the escaped or unescaped result.
Worked example
<item id="x">Tom & Jerry</item> becomes <item id="x">Tom & Jerry</item>. Quotes stay in text mode. HTML named entities live on the HTML entity encoder; pretty-print is on the XML formatter.
Frequently asked questions
- How is this different from HTML entities?
- XML 1.0 predefined entities are amp, lt, gt, quot, and apos. HTML pages often use ' for apostrophe; XML prefers '. This page does not invent HTML named entities like .
- Text vs attribute mode?
- Text escapes &, <, and >. Attribute mode also turns quotes into " / ' so a value can sit in an attribute.
- Numeric character references?
- Unescape understands © and ©. Escape does not rewrite ordinary Unicode — only the five XML specials.
- Uploaded?
- No.