Tools

Remove Empty Lines

Delete blank lines from text

How to remove empty lines

  1. Paste text with unwanted gaps: copied web pages, PDFs, emails, code or exported lists.
  2. Press the highlighted Remove empty lines button. All empty lines, including lines that only contain spaces or tabs, are removed.
  3. Copy the compact text. Other line operations, such as trimming or removing duplicates, are one click away.

Where blank lines come from

Text copied from websites and PDFs often arrives with extra blank lines between every paragraph or even every line, and spreadsheets exported to text can leave empty rows. Lists collected from several people contain gaps where someone pressed Enter twice. Blank lines break things such as CSV imports, mail merges and scripts that read one item per line, and they make documents look untidy.

This tool removes any line that is empty or whitespace-only and leaves every other line exactly as it was, including indentation inside lines. If you want to keep paragraph breaks but collapse runs of blank lines into one, use the Text Cleaner's "Remove extra spaces" option instead. To join everything into a single paragraph, use Remove Line Breaks.

All processing happens in your browser.

FAQ

Does it remove lines with only spaces?

Yes. Lines containing only spaces or tabs count as empty.

Will it change the remaining lines?

No. Non-empty lines are kept exactly as they were.

How do I keep one blank line between paragraphs?

Use the Text Cleaner with the "Remove extra spaces" option, which collapses runs of blank lines into one.