About the XML Diff
A plain text diff of two XML files is usually noise. One export writes everything on a single line, the other indents with tabs, and an unrelated tool reorders attributes, so every line looks changed. This comparison reformats both documents with identical indentation first, optionally sorts each element's attributes alphabetically, and only then runs a line comparison. What is left highlighted is a genuine structural or value change.
Removals appear in amber with a strike-through, additions in green. The status line counts changed chunks, and Download saves a standard unified patch that git apply, patch and most editors will accept. Copy puts that same patch on your clipboard rather than the coloured markup, which is handy for pasting into a ticket.
Both panes are parsed before anything is compared, so a document that is not well-formed stops the run with a line and column instead of producing a misleading result. Tick Ignore comments when one side carries generated headers such as build timestamps. For a colour-coded look at a single document instead of a pair, open the XML Viewer, and for line-level comparison of any other text use the Diff Checker.
How to use
- Paste the original document in the left pane and the revised one in the right pane.
- Leave Sort attributes ticked unless attribute order is meaningful in your format.
- Read the highlighted result: amber is removed, green is added.
- Download the unified patch if you need to apply or attach the change.
Common questions
- Does it compare semantically or line by line?
- Line by line, but after both documents have been normalised, so cosmetic formatting differences are removed before the comparison runs.
- Why does it say the documents are identical when the files differ?
- The files differ only in whitespace, indentation or attribute order, all of which are normalised away. XML parsers treat those documents as equivalent.
- Can I compare two SVG files?
- Yes. SVG is XML, so both panes accept it and the same normalisation applies.
- What does the downloaded file contain?
- A unified diff between the two normalised documents, named first.xml and second.xml in the patch header.