XML Diff
Compare two XML documents and highlight structural and value differences.
Related Tools
FAQ
- How does XML Diff compare documents?
- Both inputs are parsed using the browser's DOMParser. The tool then recursively walks both trees in parallel, matching child nodes by tag name and position. Any node that exists in one tree but not the other is flagged as added or removed, and text content changes are shown as value changes.
- Does it handle attributes?
- Yes. Attributes on each element are compared independently. If an attribute is added, removed, or its value changed, the diff surface that change with its XPath-style path, such as root.item[0].@id.
- What if my XML is malformed?
- The DOMParser will report a parse error and the tool displays it immediately. Fix the XML syntax first — the comparison only runs when both inputs are valid.
XML Diff parses two XML inputs, traverses their node trees, and produces a color-coded diff showing added nodes, removed nodes, and changed values. Use it to compare API responses, configuration files, or any structured XML documents. Differences are shown as XPath-style key paths with old and new values. All processing happens in your browser.