XML compare

 

This tool allows you to compare XML nodes and visualize the semantic differences.

You can see the user guide to help you to use this XML comparison tool.

First XML document



Second XML document








User guide

This small tool allows to compare two XML data structures, and visualize the diff.

Copy and paste, drag and drop a XML file or directly type in the editors above, and then click on "Compare" button they will be compared if the two XML are valids.
You can also click on "load XML from URL" button to load your XML data from a URL (Must be https).
You can also click on "Browse XML file" button to load your XML data from a local file.

You can also directly compare two XML files by specifying their urls in the GET parameters url1 and url2.
Example: https://extendsclass.com/xml-diff.html?url1=https://extendsclass.com/mock/rest/3b3aea6de65f5bd7576a1079bf9b6ec5/sample1.xml&url2=https://extendsclass.com/mock/rest/3b3aea6de65f5bd7576a1079bf9b6ec5/sample2.xml

Then you can visualize the differences between the two XML documents. It highlights the elements which are different:

  • Different value between the two XML: highlight in red color
  • Element only presents in a single XML: highlight in yellow or orange color

You can navigate to next / previous difference:

  • Clicks on "Next diff" button in order to go to the next difference
  • Clicks on "Previous diff" button in order to go to the previous difference


Online XML compare tool

It can be helpful to compare XML documents, unfortunately it can be difficult to see the differences between large XML documents. This free online tool will allows you to do this easily.

XML diff tool makes a semantic comparison, it compares every attribute–value pairs of objects. It compares each node according to their position in the arrays. It sorts and formats the XML strings in order to find the semantic differences instead of just the text ones.

Note: For mixed-content elements (containing character data and elements), it compares the elements two by two according to their order (instead of by type) in the parent element.

Mixed content exemple:

<tool>The best <strong>compare tool</strong> :D</tool>

You can give us your feedback (you can make comments).

XML vs JSON

Extensible Markup Language (XML) is a markup language that uses human-readable text to transmit data. This format is a W3C Recommendation.

JSON and XML are similar on many specificities:

  • Both can be used to receive / send data from / to a web server.
  • Both can be used by programming languages
  • ...

JSON has advantages over XML: JSON is shorter and it is therefore quicker to read and write.

Despite the progress of using the json format, the xml format is still widely used.


Load XML From URL
Save XML Diff
Your diff has been permanently saved and you (or anybody) can access with this link:
Password
Choice a password to modify/delete this diff later Enter password to modify this diff. Enter password to delete this diff. Enter the new password for the fork.
You can report a bug or give feedback by adding a comment (below) or by clicking "Contact me" link (at the top right hand corner of the page).

Comments




R-2019-07-04 16:05
What are the input file parameters? Chokes comparing 9MB files.


Cyril (admin)-2019-07-21 19:33
My code should not be very optimized, that must come from there the problem with 9 MB files :(


Joanna-2019-11-13 22:17
Can you show the results after comparing? like: 1. if two files are the same, it will show: 0 difference 2. if not same, it will show: n(number of difference)


Cyril-2019-11-14 19:31
yes, I will add it in a next update, it is a good idea. Thank you.


Cyril (admin)-2019-12-07 07:42
It has been done!


Kristjan-2019-12-19 12:47
It doesnt do anything other than tell if the XML is valid or not.


Cyril (admin)-2019-12-19 16:54
Hi, it only shows the differences when your two xml are valid.


Martin-2020-01-21 10:59
Copied and pasted 36kB xml, and nothing happens. I checked the "Console".<br/>Browser: Chrome (the latest)<br/><br/>Failed with the following in the console:<br/>Uncaught TypeError: Cannot read property 'length' of undefined<br/> at displayElement (xml-diff.html:401)<br/> at xml-diff.html:428<br/> at NodeList.forEach (<anonymous>)<br/> at displayElement (xml-diff.html:421)<br/> at xml-diff.html:428<br/> at NodeList.forEach (<anonymous>)<br/> at displayElement (xml-diff.html:421)<br/> at compareXML (xml-diff.html:180)<br/> at onChangeText (xml-diff.html:47)<br/> at codemirror.js:50


Cyril (admin)-2020-01-22 21:05
Hello Martin, thank you for this error reporting. Can you send me your xml file (contact@extendsclass.com) in order to reproduce?


asdaa-2020-02-12 00:18
Where the f is compare button


Cyril (admin)-2020-03-21 15:22
Below the editors :)


Tuxpilot-2020-04-05 20:52
Nice tool.
It appears that tag names and the first attribute name get smashed together in the orange and yellow sections.


Attila-2020-04-09 10:05
I tried to compare XML files, but this tool just compares them line by line and not as XML files.


Cyril (admin)-2020-04-09 14:53
Strange. Can you send me your XML files (contact@extendsclass.com) ?


Ray-2020-04-13 21:36
Does this tool offer user to use Bearer token for xml diff comparison via using 2 URLs?


Cyril (Admin)-2020-04-13 21:47
No :(


Gowtham-2020-04-21 10:22
Its getting crashed when i compare 50000 line xml file. Please suggest. Also, let me know how to purchase this product


Cyril (Admin)-2020-04-22 14:31
Hi, thanks for reporting the issue. I will not have time to improve it for a while :( but I will watch when I have time!
It's not for sale, it's free :)


shri-2020-06-08 13:42
I am getting passwordpoppup at the start of the page and its not getting removed even i clicked on closed


shri-2020-06-08 13:42
I am getting Password window open after login and its not getting remoevd even i clicked on closed button


Lambo-2020-08-17 08:05
Hi,
just little bug: I compared two xml files and result was perfect (similar xml - same nodes but in different order), then I turn off my pc. Next day I restored my browser, this page was loaded, so I input two xml files again (same files as day before). This time comparing not working, files was evalueated as different (with red lines). There is probably some problem with reloading of page.

Great page though.
Have a nice day.


Rob-2020-08-18 18:59
This compared my files better than Beyond Compare did. Thank you for putting in the effort to this tool that ended up helping me a lot and also saving me a lot of time.


Tiago-2020-09-14 22:41
Amazing tool!
I need to develop exatly that on my system, what language did you use?
Any tips on what I can research to develop something like this?