XML Diff
Compare two XML documents and see what changed.
XML Diff – Compare Two XML Files Online
The XML diff tool compares two XML documents semantically and lists exactly what changed: which elements and attributes were added, which were removed, and which values differ — each with its full path. Paste the original on the left and the modified version on the right; the report updates as you type.
Semantic, not line-by-line
A classic text diff flags every reformatted line, every reordered attribute, and every change of indentation. This tool parses both documents first and compares the resulting trees, so
<order id="1" status="new">and<order status="new" id="1">are equal,- pretty-printed and minified XML are equal,
- a changed value deep inside the document is reported once, with a precise path like
$.order.shipping['@method'].
Reading the report
Each entry is marked Added, Removed, or Changed. Changed entries show the old and the new value side by side. The summary chips count each kind, and Copy report gives you a plain-text list to paste into a code review, a ticket, or a changelog.
Repeated elements
Lists such as <item> or <entry> are compared by position by default. When the order of those elements carries no meaning — a set of tags, permissions, or line items — switch on Ignore order of repeated elements so that shuffled lists are not reported as changes.
Values are compared as written
Text and attribute values are compared as strings, without type conversion, so 7.5 versus 7.50 or true versus 1 shows up as a change. Namespace prefixes are part of element names: if one file writes ns1:item and the other ns2:item, the elements are treated as different. When one side is not well-formed, the error message names the side and the line to fix.
Typical uses
Checking what a configuration change really did (Maven pom.xml, Spring or Android XML), comparing API responses before and after a deployment, verifying a data migration, or reviewing two versions of a WSDL or XSD.
Related tools
Normalize files for reading with the XML Viewer, make sure both inputs are well-formed with the XML Validator, or compare JSON documents with JSON Diff.
Frequently Asked Questions
Does formatting or attribute order count as a difference?
No. Both documents are parsed and compared by content, so indentation, line breaks, attribute order, self-closing vs. empty tags, and the XML declaration are ignored. Only real changes to elements, attributes, and text are reported.
How are the changed paths written?
Paths follow the element structure from the root, for example $.order.customer.email. Attributes appear with an @ prefix ($.order['@status']), repeated elements are addressed by a zero-based index ($.order.items.item[1]['@qty']), and the text of an element that also has attributes is shown as #text.
What does “Ignore order of repeated elements” do?
Repeated siblings like several <item> elements are normally compared position by position, so inserting one at the top marks every following item as changed. With the option on, they are matched regardless of order and only truly added or removed items are shown.
Are values compared as text or as numbers?
As text, exactly as written. 7.5 and 7.50 are therefore reported as different, which is what you want when checking exports byte for byte.