Logo

Free Online XML Escape And Unescape

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 &apos;, with &quot;, & with &amp;, < with &lt;, and > with &gt;, 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

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;message&gt;
    &lt;title&gt;Tom and Jerry&apos;s &quot;Great Escape&quot;&lt;/title&gt;
    &lt;content&gt;Use &lt;strong&gt;bold&lt;/strong&gt; and &lt;em&gt;italic&lt;/em&gt; tags.&lt;/content&gt;
    &lt;author&gt;John&apos;s &quot;Tech&quot; Blog&lt;/author&gt;
&lt;/message&gt;

XML Unescape

Escaped XML

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;catalog&gt;
    &lt;book id=&quot;B001&quot;&gt;
        &lt;title&gt;Learning XML and XPath&lt;/title&gt;
        &lt;author&gt;Jane&apos;s Publishing&lt;/author&gt;
        &lt;description&gt;A beginner&apos;s guide to XML and &quot;XPath&quot;.&lt;/description&gt;
    &lt;/book&gt;
&lt;/catalog&gt;

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>

Related Tools