XML Compare: common questions

Short answers. How the comparison works has the details.

How do I compare two XML files online?

Open XML Compare, paste the two documents into the editors (or use Upload 2 files, or drop the files onto the editors) and press Compare. The differences are shown side by side and highlighted. It is free, with no sign-up and nothing to install.

Does it ignore whitespace, indentation and attribute order?

Yes. The documents are compared as XML trees, not line by line, so indentation, line breaks, the order of attributes, <b/> versus <b></b> and single versus double quotes are not differences.

Can I compare XML that is not well-formed?

Yes. Common mistakes are repaired before comparing: elements left open are closed, a bare & is escaped, attribute values get quotes, a misspelled end tag is corrected, and so on. Every repair is listed in the Log view. Anything that cannot be repaired is shown as an error with its line and column. Repair, beside Compare, corrects the text in the editors themselves.

Can I compare a snippet instead of a whole document?

Yes. A part copied out of a larger document works as it is: several elements without a common root, a prefix whose namespace declaration was not copied, or HTML entities such as &nbsp;.

How are moved and renamed elements shown?

A renamed element is shown as one element whose name changed, when its id or most of its content is the same. An element moved to another position is shown as removed in one place and added in the other, because the order of elements matters in XML.

Can I ignore some kinds of differences, such as comments?

Yes. In the settings (the cog above the documents), Differences to count has a box for each kind of node and change. An unticked kind is still shown, in grey, but not counted. For example, untick Added in every row to check that the right document still contains everything in the left one.

How large can the files be?

Up to 5 MB per document. Documents nested deeper than 1000 levels are refused, and external DTDs are never downloaded.

Are my files stored?

No. The documents are sent to the server only to be compared, are compared in memory and are never stored. The site sets no tracking cookies; see Privacy on the Info page.

An unhandled error has occurred. Reload 🗙