XML Compare Tool: Element & Attribute Diff
Compare two XML documents by structure. See added, removed and changed elements, attributes and text, with namespace-aware XPath-style paths.
FreeRuns in your browser
XML Compare tool
Runs in your browser. External entities and DTDs are never loaded.
Original XML
Modified XML
About this tool
Compare two XML documents by structure instead of text. Attribute order, indentation and namespace prefixes don't create noise; added, removed and changed elements, attributes and text do.
Repeated elements are matched by their id attribute when every one has a unique id, otherwise by position. Paths are shown XPath-style, such as /order/item[2]/@qty.
How to use it
- Paste the original and modified XML.
- Optionally list element or attribute names to ignore (for example timestamp).
- Press Compare and click a difference to jump to it.
Limitations
- Renamed elements are reported as removed plus added.
- Mixed content is compared as concatenated text.
- Comments and processing instructions are not compared.
Example
<order id="1" status="NEW"><total>10</total><note>x</note></order>
<order id="1" status="PAID" channel="web"><total>12</total></order>Attribute changed /order/@status "NEW" → "PAID"
Attribute added /order/@channel missing → "web"
Text changed /order/total/text() 10 → 12
Element removed /order/noteCommon use cases
SOAP response changes
See what changed in a SOAP response after a service upgrade.
Environment differences
Compare XML from two environments while ignoring message IDs and timestamps.
Config drift
Diff XML configuration files without whitespace noise.