How To Compare Two Text Files Using Notepad++

Notepad++ logo iconLet’s say you have two text files that are pretty similar in content and you want to find out what the differences are between those two. You can easily do so using Notepad++.

Basically, once you have Notepad++ installed, here is what you do:

1. Open up the two files that you want to compare in Notepad++.

2. Goto Plugins > Compare > Compare

3. That’s it! Both files will show up side by side and you will see the differences highlighted.

Update 1: For those who have downloaded newer versions and can’t find the Plugins > Compare > Compare menu, please read how to get compare plugin back into notepad++.

Update 2: There’s now an even easier way to get new plugins such as the “compare plugin” installed into Notepad++. Just use the new Notepad++ Plugin Manager introduced since Notepad v5.6.

Go to the Plugins menu > Plugin Manager , check the Compare checkbox and press install.
notepad++ plugin manager compare plugin

Tips: You can also use winmerge to compare two text files.

61 thoughts on “How To Compare Two Text Files Using Notepad++

  1. When I use the compare plugin built into Notepad++ to compare line text between two text files, how do I select & copy just the added lines (highlighted in green with the + sign icon to the left)?

    What I’m trying to do is simply select all the line differences in one text file so that I can copy and paste them into a new text file.

    I searched everywhere and I can’t figure out how to do this.

    Any suggestions on how to accomplish this are most appreciated.

    Thanks

  2. Thank you very much for this tutorial. I had to update a WordPress theme and didn’t want to lose all of my work. This made the whole update process complete inside of 1 hour vs days.

    Thank you thank you thank you.

  3. Thank you very much for this tutorial. Editing and checking those XML files would have taken a lot of time. Now I made it in 5 minutes.

  4. I’ll save may thanks for an answer to:

    Is there a way to see Highlighted Differences of the two compared files?

  5. Unfortunately using this plugin caused my workstation to crash (BSOD), losing me work and a lot of time :( I was tring to compare two 77mb text files.

    Would not recommend using it at all, you have been warned! Going to head across to WinMerge to carry out this task.

    • Hi Matt, I have’t tried comparing two files of that filesize yet so not sure about how stable it is doing so in notepad++.

      I did wrote about using winmerge, it’s in fact the default software I use when I want to compare 2 text file. It supports microsoft office files (word, excel etc) comparison too with a free plugin so that’s an extra.

      Another useful text comparison tool is kdiff3, it allows comparison of up to 3 files side by side.

      • Hi David, Many thanks for your rapid reply. The reason is so you can send your results to a third party (for example). If you could PDF the results so it showed both docs and all the changes, for example, that would be quite fantastic.

        The alternative is sending the third party both docs to be compared and telling them to download Notepad++ plus your *excellent* plug-in and then to run the compare themselves.

        Does this make sense? Still think the plug-in is fabulous though, this is really just a minor quibble.

        Thanks again,

        David.

Leave a Reply