Semantic XML Diff in Your Browser

Compare Two XML Files with Structural Context

A semantic XML diff tool that understands hierarchical structure — not just text. Detect element changes, attribute modifications, and missing nodes with full path context.

Base XML

Contrast XML

XML Documentation

Find task-based guides for comparing XML, loading and sharing results, editor and library workflows, and automation.

Start with XML comparison

Learn the basic workflow and the rules behind XML Data Compare.

Load & share comparisons

Build result URLs and create share links, with encoding and privacy details.

Editor & library workflows

Review comparisons in VS Code or integrate the XML comparison core in JavaScript.

Automate XML comparison

Run comparisons from the command line or through an AI coding assistant.

Semantic XML diff vs. text diff

Data Compare examines parsed XML structure and values. Git Diff remains available when you need to inspect the exact original text.

Structure over presentation

Attribute reordering and indentation changes alone do not create a semantic difference. These service elements have the same parsed structure and values.

<service name="billing" enabled="true">Ready</service>
<service
  enabled="true"
  name="billing"
>Ready</service>

Normalized values

Comments are ignored and numeric-looking values become numbers. Data Compare treats these inputs as equal; Git Diff still shows their source-text edits.

<!-- deployed -->
<retries>1.0</retries>
<retries>1</retries>

CDATA contributes text, and Data Compare renders XML reconstructed from parsed values. Its normalized layout and value spelling can therefore differ from the source; Git Diff preserves the original input for line-level review.

Need details about repeated elements, case handling, and namespace prefixes? Read the XML comparison rules

Need to inspect the original XML text line by line? Read the XML Git Diff view guide

Choose XML comparison rules

Start with what positions, order, duplicates, and casing mean in your XML vocabulary.

Repeated-element methodUse it whenTrade-off
By Index

Each repeated-element position has a stable meaning, such as fixed slots or ordered snapshots.

An insertion shifts later positions and can make many following elements look changed.

LCS

Order matters and insertions or deletions should align through the longest common subsequence.

It preserves order, so moving an element is represented as deletion and insertion rather than a move.

Unordered

Sibling order is irrelevant, such as tags or permission lists.

It uses multiset matching: duplicate occurrence counts still affect the comparison result, so duplicates are not discarded like a set.

Element/attribute name case

Ignore name case only when Service and service, or Status and status, mean the same names in your XML vocabulary.

Text and attribute value case

Use case-insensitive values for normalized text, not for case-sensitive identifiers, tokens, or user content.

XML Diff Use Cases

Use structural XML comparison to review changes across development and data workflows.

API & SOAP Services

Compare XML request/response payloads for SOAP web services, REST APIs with XML responses, or WSDL definitions. Locate changed elements, attributes, and text while reviewing a contract change.

Configuration File Diff

Track differences between configuration file versions — pom.xml, web.xml, Spring configs, Android manifests, or any structured XML config. Use this XML diff checker to stay in control.

Data Transformation Validation

Validate XML data transformations, compare XSLT outputs, or verify data migration results between XML-based systems and databases.

Document Format Comparison

Compare structured documents in XML-based formats like DocBook, DITA, or SVG files where element structure matters. Review element, attribute, and text changes across documentation revisions.

FAQ

01Is my XML data sent to a server?
Entering or pasting XML for comparison does not upload it. Parsing and comparison run locally in your browser. Using Share uploads the compared content to our share server. Data placed in URL query parameters is sent with page requests and may be recorded in hosting logs, so do not place sensitive data in URLs. Importing from a URL sends a request to the source you specify.
02Are namespace prefixes normalized before comparison?
No. Prefixes remain part of element and attribute names instead of being expanded to canonical namespace URIs. Documents that use different prefixes for the same namespace can therefore report name differences. Attributes are compared independently from element text and children.
03What should I consider for large XML documents?
Parsing, recursive comparison, and editor rendering all use browser memory and CPU, so practical limits depend on document size, nesting, device, and browser. Compare representative excerpts when reviewing a very large file, and use LCS or Unordered only when their matching behavior fits the data.