- Instant help with your Developer coding problems

Remove duplicate lines in Notepad++

Notepad++ has a lot of built-in tools to manipulate text files. One of the most frequently asked questions is how to delete duplicate lines from a file. Fortunately, the developers of Notepad++ have recognized this need and have included it in the editor since version 8.1. This also means you don't need to install any plugin or use regular expressions to delete duplicate rows.

Remove all duplicate lines from a text file

To get rid of duplicate lines simply select the option from the menu: Edit -> Line Operations -> Remove Duplicate Lines and that's all. All duplicates are deleted and only the unique values remain.

Remove duplicate lines

 

Remove duplicate rows only from the selection

You can still use the above procedure if you do not want to delete duplicate lines from the whole file, but only from the selected part of the text. If there is a selection, Notepad++ will only remove duplicates from the selected text.

Remove only consecutive duplications

If you only want to delete consecutive duplicate rows, you can easily do that too. In this case, select the Edit -> Line Operations -> Remove Consecutive Duplicate Lines as you can see here:

 

Remove consequtive duplicate lines

 

Share "Remove duplicate lines in Notepad++" with your friends