XML Diff
Compare two XML files online. See what changed between XML documents. Free XML diff and XML compare tool.
Left XML
0 lines · 0 chars
Loading editor...
Right XML
0 lines · 0 chars
Loading editor...
Features
- Compare two XML documents as JSON-like trees
- Flag added, removed, and changed paths
- Ignore pretty-print whitespace by parsing first
- Attribute changes show up as @keys
- All work stays in the browser
- Paste left and right, or load samples
Common Use Cases
- See what changed between two SOAP responses
- Diff Android manifests across app versions
- Review a config change without fighting indent noise
- Check an export before and after a migration
- Confirm a minified and pretty file are the same tree
Structural XML diff
We parse both sides, convert to the same JSON convention as XML to JSON, then walk the trees. Key order in the source file does not count. Whitespace between tags does not count. Text and attribute values do.
This is not a legal redline and not a byte diff. Repeated elements are compared by array index, so inserting a record at the top shifts later indexes. For list diffs that care about identity, sort or key the records first.
Examples
Valid - Same tree, different indent
<a><b>1</b></a> vs <a>
<b>1</b>
</a> Valid - Value change
<a>1</a> vs <a>2</a> Invalid - Broken left document
<a><b></a>Frequently Asked Questions
Why did inserting one item mark many rows changed?
Arrays are positional. An insert at index 0 makes every later sibling look moved. Use a keyed format or sort if you need identity.
Are comments compared?
No. They are dropped in the JSON projection.
Tips
- Pretty-print both sides only for your eyes. The diff already ignores indent.
- If namespaces prefixes differ but URIs match, you may still see a change on the tag string.