XML Escape / Unescape
Make any text safe for XML content and attributes — or decode the entities back out.
About this tool
Five characters have special meaning in XML: & <
> " and '. Unescaped, they can break document
parsing or hide data smuggled into attributes. This tool converts them to their predefined
entities and back.
How to use it
- Paste the text to make XML-safe, or click Sample.
- Click Escape ▸ to encode, or paste escaped text and click ◂ Unescape.
Good to know
- The five predefined entities cover both element content and attribute values.
- Unescaping also decodes numeric references such as
&and&. - For HTML-specific output you can use the HTML Escape tool — the difference is only in the quote entities.