Skip to content

XML Unescape

Convert XML entities and numeric character references back into the characters they stand for.

Processed locally in your browser

0 chars · 0 lines
The result will appear here.

What is XML Unescape?

XML text often reaches you in escaped form: feeds, SOAP payloads, database exports and logs contain sequences such as &lt;div&gt; or Caf&#233;. Reading or reusing the content requires turning them back into < > and é.

This tool decodes the five predefined XML entities (&amp;, &lt;, &gt;, &quot;, &apos;) and decimal or hexadecimal numeric references, including astral characters such as emoji. Named entities that XML does not define (for example &copy; or &nbsp;) are left unchanged and listed in a warning, and references to characters that XML forbids are not converted.

How does it work?

  1. Paste the escaped text.
  2. The decoded text appears immediately.
  3. Check the warnings for entities that were left unchanged.
  4. Copy the result, or Swap to escape it again.

Common use cases

  • Reading escaped markup embedded in an RSS description or a SOAP field.
  • Decoding text copied from an XML export or a log line.
  • Converting numeric references such as &#233; back into readable accents.
  • Checking a round trip with the XML Escape tool.

Examples

Try this input in the tool above:

Input
if (a &lt; b &amp;&amp; c &gt; d) { print(&quot;Tom &amp; Jerry&apos;s caf&#233; &#x263A;&quot;); }
Output
if (a < b && c > d) { print("Tom & Jerry's café ☺"); }

Privacy

XML Unescape runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.

Limitations

Only the five XML entities and numeric references are decoded. HTML named entities need the HTML Entities Decoder, and entities declared in a DTD are never resolved.

Frequently asked questions

Why is &nbsp; not decoded?

XML defines only five named entities, and &nbsp; is an HTML one. It is left as is and reported. Use the HTML Entities Decoder for HTML text.

Are double-escaped strings decoded twice?

No. &amp;lt; becomes &lt; after one pass, which is correct. Run the tool again if the text was escaped twice.

What about invalid numeric references?

References such as &#0; or &#xD800; do not correspond to characters allowed by XML 1.0. They are kept unchanged and reported.

More tools in JSON & Data →