Micru Logo

Unescape XML

Decode XML entities back to their original characters. Converts < > & " ' to plain text.

All processing is done locally in your browser. No data is sent to our servers.

What is XML Unescaping?

XML unescaping (also called entity decoding) reverses the escaping process: it replaces predefined XML entity references with the literal characters they represent. The result is human-readable plain text that is no longer safe to embed directly in XML markup without re-escaping.

This is the operation XML parsers perform automatically when reading element content or attribute values. You need to do it manually when you have extracted raw escaped text from an XML document and need to display it, process it, or pass it to a system that does not understand XML entities.

Decoding Order Matters

Entity decoding must be applied in the correct order to avoid double-decoding bugs. The ampersand entity (&&) must always be decoded last. If you decode it first, the resulting & might incorrectly form the start of another entity sequence.

This tool decodes entities in safe order: ', ", >, <, then & last.

Common Use Cases

Reading API Error Messages

SOAP faults and XML-based API error responses often contain escaped HTML or code in their message bodies. Unescaping makes the actual error text readable without a full XML parser.

Extracting Data from XML Exports

Database or CMS exports sometimes store HTML content as escaped XML text. Unescaping recovers the original HTML for display, migration, or re-import into another system.

Debugging Double-Escaped Content

A common bug is escaping content that was already escaped, producing < instead of <. Unescaping once reveals whether the underlying data is still escaped.

Log File Analysis

Application logs that record XML payloads often log the raw escaped form. Unescaping the log snippet restores the original XML structure so you can analyse it with standard XML tools.

Numeric Character References

XML also supports numeric character references for any Unicode code point: decimal (© = ©) and hexadecimal (© = ©). This tool decodes only the five predefined named entities. For documents heavy with numeric references, use a full XML parser to decode the entire document correctly.