ToolJovia
Text

Remove Empty Lines

Remove blank lines from text, optionally retaining lines that contain spaces or tabs.

✓ Browser-local processing

Loading tool…

How to use Remove Empty Lines

Compact a pasted list or document without changing the text on retained lines. Choose whether whitespace-only lines count as empty.

  1. Paste text that contains unwanted blank lines.
  2. Choose whether to remove whitespace-only lines too.
  3. Run the tool and copy the compact output.

Good to know

  • Retained lines keep their indentation and surrounding whitespace.
  • CRLF and CR line endings are normalized to LF. A trailing empty line is removed.

Common questions

Will indentation disappear?

No. Only entire matching lines are removed. Text and indentation on retained lines stay unchanged.

What counts as a whitespace-only line?

A line whose contents are all whitespace according to JavaScript trim, including spaces and tabs.

Keep going with related tools

All text →