XML Escape Unescape

Turn raw text into XML-safe entities and back. Fix ampersands, angle brackets, and quotes so parsers and attributes behave correctly. All processing runs in your browser.

0 chars·0 entities·Ready

The five XML entities

&&Ampersand (escape first)
<&lt;Less than
>&gt;Greater than
"&quot;Double quote
'&apos;Apostrophe

Why escape ampersands first

XML reserves five characters. The ampersand starts every entity, so if you escape < and > before &, you can end up with something like &amp;lt; instead of &lt;. This tool applies the correct order: ampersand, then angle brackets, then quotes.

Use escape when you are putting user input or external text into an XML element or attribute. Use unescape when you have stored or transmitted XML and need to show or edit the raw characters again. Processing is done locally; nothing is sent to a server.