Compare two XML or HTML documents and find all structural differences.
See exactly what was added,
removed, or
changed — with full element paths.
Also: JSON ↔ XML | JSON Compare | YAML Compare.
All processing happens locally in your browser — your data is never uploaded to any server.
Format:
Document A (Original)
Document B (Modified)
Differences
Enter two documents above and click Compare to see the differences.
How to use: Paste your original document in the left textarea (A) and the modified version in the right textarea (B). Select the format (XML or HTML) and click Compare to see all differences.
Result colors:Green = added in B, Red = removed from A, Yellow = value changed.
XML mode: Uses strict XML parsing. Attributes use @ prefix in paths. XML comments and processing instructions are ignored.
HTML mode: Uses browser's native HTML parser (more forgiving). Only elements inside <body> are compared. Attributes use @ prefix in paths.
Tip: In Set compare mode, repeated sibling elements are compared as unordered sets (order ignored). Otherwise, they are compared position-by-position.
Markup diff — attributes and whitespace
Two XML documents can be textually different yet semantically identical: attribute order is not significant, namespace prefixes can differ, and indentation is presentation. A markup-aware comparison parses both documents first, so these formatting differences do not count — only element structure, attribute values and text content do. Comments and processing instructions are ignored.
Set compare treats repeated siblings as unordered sets when element order is irrelevant.
🔷 Diff Summary
Paste two documents and click Compare to see statistics.