XML Compare & Diff Tool
Compare XML structure, namespaced attributes, ordered children and text. Choose whitespace and comment handling.
Compare XML data rather than line layout
Paste two XML documents. The result lists changed attributes, text and child nodes with before/after values and positional paths. Attribute order is ignored. Element and attribute names use namespace URI plus local name, so a prefix rename alone does not create a difference. Child order remains significant.
CDATA and adjacent text nodes are compared as text. Whitespace-only nodes can be ignored, including spaces between inline elements; turn this option off when those spaces matter. xml:space="preserve" takes priority. Comments are optional; processing instructions are compared. Paths are diagnostic labels, not executable XPath expressions.
Limits and parsing
Both inputs must be well-formed XML. DTD and entity declarations are rejected and no external resources are read. Namespace-valued attribute contents are compared literally, not schema-resolved. Limits per input: 200,000 characters, 20,000 nodes and 64 levels. At most 1,000 differences are returned, with a truncation flag.
Questions & answers
Is a different namespace prefix a change?
Not when the namespace URI and local name are the same. Changing the URI is a change even if the prefix stays the same.
Does this match moved children by ID?
No. Children are compared in document order, so moves appear as positional changes. This avoids inventing an ID convention that XML does not define universally.