Skip to content

Notepad++ Remove Duplicates, Remove Blank Lines, and Sort Data in One Operation

Notepad++ logo.

You can use the 32-bit version of Notepad++ with the TextFX plugin to quickly remove duplicates, remove blank lines, and sort data - in one operation! This is a fast and easy way to get the results you want in just a few seconds. And as with any kind of automation: the more data you work with, the more time you save 🤓

Animation showing how to remove duplicates, remove blank lines, and sorting data in Notepad++.

The quick version:

  • Install the 32-bit version of Notepad++
  • Install the TextFX plugin (this is not available in the 64-bit version of Notepad++)
  • Enable Sort outputs only UNIQUE
  • Click Sort lines case [in]sensitive

Remove Duplicates, Remove Blank Lines, and Sort Data in One Operation

In this example, we have a list of data types used in a SQL Server table. We want to find all the unique data types used, and also sort them alphabetically.

1. Click TextFX → TextFX Tools → Enable Sort outputs only UNIQUE (at column) lines:

Screenshot of enabling the unique sorting option.

2. In the Notepad++ window, paste the text that you want to remove duplicates and blank lines from. In this example, we have 500 lines, and half of them are blank:

Screenshot of the status bar showing the original line count.

3. Select all the text, click TextFX → TextFX Tools → Sort lines case sensitive (at column) or Sort lines case insensitive (at column):

Screenshot of sorting lines.

4. Tadaaa! 🥳 We have now removed duplicates and blank lines, and the data has been sorted alphabetically. In this example, we ended up with only 15 lines:

Screenshot of the status bar showing the new line count.

Summary

In the 32-bit version of Notepad++, you can use the TextFX plugin to quickly remove duplicates, remove blank lines, and sort data - in one operation! First, make sure that you have the Sort outputs only UNIQUE option enabled. Then, use the Sort lines case [in]sensitive feature.

That’s it! This is a very handy feature, but it is somewhat hidden away in the menu. Once you find it, however, it can save you a lot of time 🤓

Share or Comment?

About the Author

Professional headshot of Cathrine Wilhelmsen.Cathrine Wilhelmsen is a Microsoft Data Platform MVP, international speaker, author, blogger, organizer, and chronic volunteer. She loves data and coding, as well as teaching and sharing knowledge - oh, and sci-fi, gaming, coffee and chocolate 🤓