Compare two text files with Notepad++
It often happens, when you have to work with a lot of data, to need to know differences between two sets of text data.
A simple solution to know quickly if data set look alike or not, or to have an overview of different lines, is to use Notepad++ [1].
You will also have to install Compare plugin. To do so, go on SourceForge [2], and download the latest plugin version. You then just have to extract downloaded archive in your Notepad++ installation folder.
Then, open your 1st file (Fig 1), and the second one (Fig 2), using Notepad++, and when the two files you want to compare will be the two last files open in the software, start comparison with Plugin => Compare => Compare (Fig 3), or keyboard shortcut Alt+D.
Your two files will then be, after processing, displayed with their differences (Fig 4) : lines deleted (-) and lines added (+). Lines found in both files will remain displayed with a white background.
Update July 2018 : Notepad++ compare two xml
It is also possible with Notepad++ to compare xml files. Simply follow previous steps, which are Notepad++ compare plugin install, open xml file in Notepad plus plus, and comparing them using the menu Notepad++ Plugins Compare.
XML compare for free in Notepad++ will be done instantly, showing the lines removed, the lines added, the text modified in same line. Notepad plus plus probably is the best XML editor as it works also as an XML formatter, and a great xml editor windows 10.
This is how to edit xml files in notepad, but also how to save xml file in notepad.
Links and credits
- [1] – Notepad++, complete text editor – http://notepad-plus-plus.org
- [2] – Notepad++ ComparePlugin, text files comparison plugin – http://sourceforge.net