Remove Empty Lines

Delete blank lines from text, including lines that look empty but contain spaces or tabs. Every line with content is kept in order.

Options

Processed in your browser. Nothing you type is uploaded.

How it works

Each line is checked for visible characters. Lines with none are removed and the remaining lines are joined back together with single line breaks.

Rules this tool follows

  • By default a line containing only spaces, tabs or other whitespace counts as empty.
  • Turn off the whitespace option to remove only truly empty lines (useful when indentation-only lines matter).
  • Windows and Unix line endings are both handled; output uses Unix-style \n line breaks.

Example

Input

First line


Second line
   
Third line

Output

First line
Second line
Third line

Common uses

  • Compacting lists copied from documents or web pages.
  • Removing double spacing from exported text.
  • Preparing data for tools that treat blank lines as records.

Limitations and notes

  • Paragraph breaks disappear too. To reduce multiple blank lines to one instead, use Remove Extra Spaces.

All text cleaners