XML Diff & Compare
About XML Diff / Compare
XML Diff / Compare parses both documents before comparison, removing layout noise while retaining element order, text, CDATA and attributes.
How it works
Well-formed inputs first
Each side is validated independently. Syntax failures identify Document A or B and include the source line and column before any comparison is attempted.
Stable XML comparison
Whitespace-only formatting nodes and attribute order are normalized while element and mixed-content order remains significant. Comments can be included or ignored.
Readable XML changes
Different documents are rebuilt with stable indentation and shown with removed lines prefixed by minus and added lines prefixed by plus.
Frequently asked questions
Does XML attribute order matter?
No. Attribute order carries no XML meaning and is normalized before comparison.
Does element order matter?
Yes. Child element and mixed-content order are retained because changing them can change document meaning.
Does this resolve external entities?
No. Entity processing and external resource loading are disabled.
Sources & last verified
The behaviour of this tool and the claims on this page were checked against the specifications below on . Everything runs in your browser, so the output you see is exactly what the engine produced.
Found a wrong result or an outdated claim? Report an error and it will be re-verified.