Jun

22

Compare Two Files Using Notepad++

Posted by 27 Comments

If you need to compare the contents of two files Notepad++ has a great plugin for doing just that. Begin by opening the Plugin Manager from the Plugins menu:

 

Next select the Compare plugin and click Install:

 

Now open both of the files you would like to compare as two separate tabs in Notepad++. Then from the Plugins menu selecct Compare -> Compare (or use the shortcut Alt+D):

 

Your two files will now be opened side-by-side with conflicting lines highlighted. You can use the blue arrows on the toolbar to navigate between each alert.

Category: Development

Comments (27)

Trackback URL | Comments RSS Feed

  1. Sena Munasinghe says:

    I love this feature and used it quite a lot. But now it’s not working for some time.
    It does not highlight differences.

    Notepad++ version 6.1.5
    Compare plug-in version 1.5.6

    Thanks for any ideas.

    Sena

  2. Nathan says:

    Looks like you might be a couple versions behind, have you tried upgrading? 6.3 is the latest version which appears to be working fine.

  3. HarizHaran says:

    Thank you for this.. This is what exactly what i’m looking for. Your screen shot explanations are able to understand easily.

  4. Peter says:

    I don’t have a plug-ins menu.

  5. KR Rayberry says:

    Just a FYI, the Compare feature didn’t come with my download of Notepad++. I needed to download it from SourceForge and add the dll to my plugins directory.

  6. Ronnin says:

    @Peter
    Settings>Import>Import Plugin(s)

  7. Anonymous says:

    note it will creash Notepad++ if more then 2 files are open

  8. sina says:

    Please make this plugin better by adding features such as the internal compression of “EmEditor” program. compare tools in emeditor is complete your plugin, compare tools in emeditor is not like notepad++ but is very comfortable and well designed.

    The “Search tool” and “Search in files” on the “emeditor” (one text editor) also very comfortable & good designed , so you can easily search for any file and jump to the corresponding line.
    Please add emeditor facilities also to the notepad++ program.

  9. Mohan says:

    This is very helpful for comparing my property files in the deployment folder. Thanks for putting it.

  10. Neelu says:

    would be so helpful if u pass how i can get source code for compare two files as it is doing for Notepad ++.

    Thank you Advance

  11. Smithk9 says:

    I truly enjoy looking at on this web site , it contains superb blog posts. Heavierthanair flying machines are impossible. by Lord Kelvin. dkeffakadeffdebe

  12. Anonymous says:

    to good

  13. Suman says:

    When I installed, opened two notepad++ documents side by side, highlighted both the contents, click on compare, it says “Nothing to compare”. Am I doing anything wrong?

    • Nathan says:

      Just open two files in the same N++ window (should be two tabs). Then run the compare and it should split them into side-by-side views as you see in the last screenshot of this article.

  14. KP.OMKAR says:

    this is very interest

  15. bc says:

    Test I ran highlights the whole line but not the character/byte(s)where diff occurs. Am I missing something? If not I ain’t impressed.

  16. Anonymous says:

    How due I get the plugins installed in my note pad?

    • Nathan says:

      When you install/update N++ there is an option to select the plugin functionality. It is usually enabled by default, so maybe you accidentally disabled it at some point? Just re-run the installer and make sure plugins are enabled. You should then be able to follow the steps in this article.

  17. lab says:

    is there a way to save the compared 2 files?

  18. lab says:

    is there a way to save the results of the compared 2 files to reference again without having to execute compare again?

  19. sam says:

    well explained. But plugin is applicable for higher versions only.

    • Nathan says:

      You mean it’s not available in older versions of N++? This article was posted in 2012, and I had been using the plugin for a long time prior to that. So it should go back pretty far. Which version are you trying to use?

  20. Anonymous says:

    Great Plugin.

  21. AcE Krystal says:

    I like it and use it a lot, but I’m alway’s struggeling getting the right file to be the one with the new changes.

    Is there a way how to switch between what is the old and what is the new file? (even though the old file might have the latest time stamp?)

Leave a Reply