How to Remove Blank Lines from Notepad++

Let’s look at two ways to get rid of blank lines in Notepad++ in Windows 10.

Method #1

Open Notepad++ file.

Hit Edit at the top.

Hover your mouse over Line Operations, located just above Comment/Uncomment.

Now you can see these two options:

Remove Empty Lines – this will remove blank lines.

Remove Empty Lines (Containing Blank characters) – which will delete blank lines that include blank characters such as “Space.”

Click on the one you prefer.

That’s all.

Method #2

This method removes spaces from the beginning of the lines as well as blank lines, including blank characters.

To do this, use Replace. Here’s how:

Press Ctrl + H to bring up the Replace popup.

In the Search Mode section, select “Regular expression.”

In the field beside Find what, type this: ^\s

Hit the Replace All button.

That’s all.

Default image
How To Raj was founded and run by Thirumalraj, an MCA graduate. Since August 2015, he has been blogging on his other blog, Technology Hint. Learn more about How To Raj here.