XML A

XML B

Diff Output

Spotting a single changed attribute or added element across two long XML files by eye is slow and error-prone — a diff tool eliminates that. This checker parses both documents using the browser's DOMParser (no upload needed) and walks every node to find differences in element names, text content, attributes, and nesting. The W3C XML spec defines the document structure being compared. Results use XPath-style paths — e.g., /config/server/port — so you know exactly where each difference lives. Common use cases include comparing Kubernetes manifests, SOAP responses, Spring Boot XML beans, Maven POMs, or any config file pair. For more on XML structure, see W3C XML. Everything runs locally — your XML never leaves your browser.

How to Use the XML Diff Checker

1

Paste XML Document A (Original)

Copy the original XML document and paste it into the left panel. It can be any valid XML — config, SOAP, data export, or API response.

2

Paste XML Document B (Modified)

Paste the modified XML into the right panel. The diff highlights additions (green), deletions (red), and changed attributes.

3

Review the Differences

Examine each highlighted difference to understand what changed between the two XML documents. Use this to review config changes, schema migrations, or API response diffs.

Example Comparison

Example: Config change between versions

XML A (original):

<config>
  <database host="localhost" port="5432"/>
  <cache enabled="false"/>
</config>

XML B (modified):

<config>
  <database host="db.prod.com" port="5432"/>
  <cache enabled="true" ttl="300"/>
</config>

Frequently Asked Questions

How does the XML diff checker work?

It parses both XML inputs into a tree structure and walks through each node, comparing element names, attributes, text content, and nesting. XML is a hierarchical markup language, so the tool traverses the hierarchy depth-first. Any difference is flagged with its full element path so you can locate it immediately. The concept of computing differences between two documents is explained in the Wikipedia article on diff.

Is my XML data sent to a server?

No. All comparison logic runs locally in your browser. Your XML is never uploaded or stored anywhere.

Can I compare large XML files?

Yes. The tool handles reasonably large files directly in the browser. For very large documents (several MB), performance depends on your device's available memory.

What kinds of differences are detected?

The checker reports added nodes, removed nodes, changed text values, and attribute differences — each with the full XPath-style path to the changed element.

Does attribute order matter when comparing?

No. The checker compares attributes by name, not position. So <tag a="1" b="2"/> and <tag b="2" a="1"/> are treated as identical. This matches the XML specification, which states that attribute order is not significant. Only the attribute values themselves are compared.

Related Tools