File comparison programs like WinMerge and WinMerge2011 are excellent for comparing general, non-structured data.

But for comparing files that contain structured text data, like XML, HTML, and JSON, those tools do not work as well. The issue is that WinMerge does not understand the structure, and therefore moved/added/deleted blocks of text are often misinterpreted.

Similar issues occur when comparing common INI settings files.

What gratis Windows software will work well for comparing text files with structured data like that found in XML, HTML, JSON, and INI files?

Ideally, there will be a single application that understands multiple data structures. That said, answers that only handle one or more forms of structured data are also welcome.

  • Just to clarify: it sounds like what you want is to compare the data, not the files. Is that correct? Can you give some more information about what you would want the tool to do? Do you want it to do something like give you an overall "score" of how similar the data is, or do you want it to match up corresponding pieces of data in two data structures?
    – BrenBarn
    Jan 28, 2021 at 9:42
  • @BrenBarn Great questions. Yes, I want the comparison tool to match up corresponding pieces of data. Ideally, the output would be like any common GUI diff tool (such as WinMerge) with two panels containing the data, and different colors representing moved/added/deleted sections. The only difference I want as compared to such common tools is the ability to recognize data structures to improve the quality of the comparison. I don't need scores or anything like that, although I'm fine if the software happens to also have that functionality. Jan 28, 2021 at 10:50

1 Answer 1


Python can load and parse all of the file types that you mention either with the system libraries or with pip installable ones such as Beautiful Soup or requests_html.

In just about all cases you end up with a tree structure and there is a library available called treecompare that looks to do exactly the sort of thing that you are looking for. The only thing missing is a GUI. The problem with a GUI on data like this is that keys/routes can potentially have differing orders.

All of the above are:

  • Free
  • Open Source
  • Cross Platform

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.