Delete all empty lines in Notepad++

Quickly remove blank lines in a Notepad++ document using the built‑in Line operations command.

What the video covers

Applies to removing blank lines from an open document in Notepad++ using the program's Edit menu commands.

Watch the video on YouTube

Step-by-step instructions

  1. Open the file in Notepad++
    Make sure the document you want to edit is the active tab in Notepad++.
  2. Open the Edit menu
    Click the Edit menu at the top of the Notepad++ window.
  3. Choose Line operations
    From the Edit menu, select the Line operations submenu.
  4. Run Remove empty lines
    In Line operations, choose the Remove empty lines command to delete all fully blank lines from the open document.

Watch the video

Video thumbnail for Delete all empty lines in Notepad++ Play tutorial

Watch on YouTube

Why it matters

Empty lines can make files harder to read or process. Notepad++ provides a built‑in command to remove all empty lines quickly without manual editing.

Check your result

After running the command, your document should no longer contain fully empty lines; text lines remain in their original order.

Troubleshooting

If nothing changes, confirm the document window is active and try again. If some visually blank lines remain, they may contain invisible characters (spaces or tabs); remove those manually or use a search/replace to delete whitespace-only lines.