Use this free online XML Escape / Unescape tool to safely encode or decode XML text. Enter or paste your XML string into the editor, then choose whether you want to escape reserved XML characters or restore escaped entities back to their original form. After processing, you can copy or download the converted XML.
The tool replaces reserved XML characters with their matching entity references when escaping, and converts those entities back into normal characters when unescaping. This includes replacing ‘ with ', “ with ", & with &, < with <, and > with >, or reversing the process whenever needed.
XML Escape / Unescape
XML Output
XML Escape & Unescape Example
XML Escape
Original XML
<?xml version="1.0" encoding="UTF-8"?>
<message>
<title>Tom and Jerry's "Great Escape"</title>
<content>Use <strong>bold</strong> and <em>italic</em> tags.</content>
<author>John's "Tech" Blog</author>
</message>
Escaped XML
<?xml version="1.0" encoding="UTF-8"?>
<message>
<title>Tom and Jerry's "Great Escape"</title>
<content>Use <strong>bold</strong> and <em>italic</em> tags.</content>
<author>John's "Tech" Blog</author>
</message>
XML Unescape
Escaped XML
<?xml version="1.0" encoding="UTF-8"?>
<catalog>
<book id="B001">
<title>Learning XML and XPath</title>
<author>Jane's Publishing</author>
<description>A beginner's guide to XML and "XPath".</description>
</book>
</catalog>
Unescaped XML
<?xml version="1.0" encoding="UTF-8"?>
<catalog>
<book id="B001">
<title>Learning XML and XPath</title>
<author>Jane's Publishing</author>
<description>A beginner's guide to XML and "XPath".</description>
</book>
</catalog>