Source
1
Target
1

What is XML Diff?

An XML diff compares two XML documents and identifies exactly what changed: elements added, removed, or modified, and attributes that changed value. Unlike a plain text diff, an XML diff understands document structure — it compares elements by tag name and path, not by line position, so reformatting the XML without changing its content produces no false differences. This free online XML diff tool highlights every change in green (added), red (removed), and amber (changed). Everything runs in your browser — no data is ever sent to any server.

When to Compare XML Documents

  • SOAP API development — compare request/response envelopes before and after a service change
  • Configuration management — audit XML config differences between environments (Spring, Maven, Ant)
  • Android resources — compare layout or string resource files across branches
  • Data migration — verify an XML transformation preserved all elements and attributes correctly
  • RSS/Atom feeds — track changes in a feed over time

Before comparing, make sure both XML documents are valid using the XML Validator. To format XML for easier reading, use the XML Formatter.

Frequently Asked Questions

What does XML Diff show?

It shows elements and attributes that were added (+), removed (−), or changed (~) between the source and target XML. Comparison is recursive — nested elements and their attributes are all checked.

Does formatting affect the diff?

No. This tool parses both documents into a DOM tree and compares structure and content — not text. Indentation differences, extra whitespace, or re-ordered attributes on the same element do not produce false differences.

What is the difference between an XML diff and a text diff?

A text diff compares line by line — reformatting or reindenting XML produces many false positives. An XML diff understands the document model, so it only flags meaningful structural or content changes.

Is my data safe?

Yes. All processing runs in your browser. Your XML documents are never sent to any server.