Compare XML Online

Compare two XML documents with a tree-first diff workspace, semantic matching, side-by-side raw verification, and local-only processing.

XML A: readyInput: 304 B

How to Use

  1. Paste or upload XML A and XML B into the left and right editors.
  2. Run Compare XML, or leave auto-compare enabled for smaller documents.
  3. Review the sticky diff summary, filter the change list, and click any difference to reveal the matching location in both editors.
  4. Use Tree Diff for structural debugging, Side-by-Side or Unified for raw verification, then export the report or open either side in the XML Validator or XML Viewer.

Related Tools

Frequently Asked Questions

Does this compare XML structure or just text?

The tool validates both XML inputs, normalizes formatting-only differences, and compares structure, attributes, text content, and sibling ordering instead of relying on a plain line diff alone.

Can it ignore formatting and namespace prefix differences?

Yes. Formatting-only whitespace is ignored by default, attribute order is ignored by default, and namespace prefix-only changes are normalized away when the namespace URI and local name stay the same.

What is the difference between strict and semantic compare modes?

Strict mode compares siblings positionally, which is useful when document order matters. Semantic mode can match siblings by key-style attributes such as id, key, name, code, sku, or uuid so reordered collections produce cleaner diffs.

What happens if one side has invalid XML?

The tool blocks comparison, highlights the invalid side, and shows line and column diagnostics near the editor so you can fix malformed XML before diffing.

Does this upload my XML to a server?

No. Validation, normalization, tree diffing, and raw diff generation all happen locally in your browser.