{ ILoveJS }

XML Decoder

Decode XML entities back to their original characters.

xmldecodeentitiesunescape

What is XML Decoder?

XML Decoder is a straightforward utility that converts XML-encoded entities back into their original, human-readable characters. When XML data is encoded, special characters like <, >, &, ", and ' are replaced with entity references such as &lt;, &gt;, &amp;, &quot;, and &apos;. This tool reverses that process, restoring the original text so it can be read, debugged, or processed normally.

For developers working with XML feeds, API responses, configuration files, or web scraping pipelines, encountering entity-encoded strings is a daily reality. Manually decoding these strings is tedious and error-prone — especially with numeric entities like &#60; or hex entities like &#x3C;. This tool handles all standard XML entity formats instantly, saving time and eliminating decoding mistakes.

How to Use

Using the XML Decoder is simple: paste your XML-encoded string into the input field and the decoded output appears immediately. The tool handles all named XML entities (&lt;, &gt;, &amp;, &quot;, &apos;), decimal numeric entities (&#60;), and hexadecimal numeric entities (&#x3C;). The result is clean, readable text ready to copy and use.

The input can be a full XML document, a snippet, or just a single encoded string — the decoder works on whatever you provide. It processes the content as plain text, decoding every entity reference it finds without altering surrounding content. This makes it safe to paste entire XML payloads and extract just the decoded version without worrying about breaking structure.

One edge case to be aware of: if your XML contains double-encoded entities (e.g., &amp;lt; which represents a literal &lt; rather than <), the tool will only perform one pass of decoding. Run the output through the tool a second time if you need to decode multiple layers. Also note that custom or non-standard XML entities defined in a DTD will not be resolved, as the tool focuses on the standard XML 1.0 entity set.

Use Cases

Debugging API responses: When an XML-based API returns encoded HTML or text inside element values, paste the response to quickly read the actual content without manually translating each entity.
Parsing web scraped data: Web scrapers often capture XML or HTML with entity-encoded attributes and text nodes. Decode the raw output to get clean, usable strings before storing or processing the data.
Reading XML config files: Configuration files exported from CMS platforms or enterprise tools frequently encode special characters in attribute values. Decoding them makes the file human-readable for auditing or editing.
Validating XML transformations: After applying XSLT or other XML transformations, verify that entity encoding was applied or removed correctly by comparing encoded and decoded versions of the output.

Related Tools