XML Escape / Unescape
runs in your browserno sign-upfree
Escape text for XML (& < > " ') into entities, or unescape XML entities back to text.
Escaped
About this tool
This tool escapes text for XML: & becomes &, < becomes <, > becomes >, and optionally " and ' become " and ' for use inside attribute values. Unescape turns these entities, and numeric ones like é or é, back into normal text.
How to use
- Choose Escape or Unescape.
- Paste your text or XML.
- Copy the result.
FAQ
Which characters must be escaped in XML?
Always & and < (they start entities and tags). > is escaped for safety. Inside attribute values, the quote character around the value must be escaped too — leave "Escape quotes" on to be safe.
Why does give an error?
XML only defines five named entities: & < > " and '. Names like or © come from HTML. Use the HTML Entity Encoder for those, or a numeric entity such as  .
How do I use Swap?
Swap moves the result into the input box and switches between Escape and Unescape, so you can check the round trip.
Is my text uploaded?
No. Escaping runs entirely in your browser, so your text never leaves your device.