Remove Empty Lines

Paste text and every blank line disappears as you type, including lines that only hold spaces or tabs. Prefer paragraphs? Choose Keep one between paragraphs and runs of blank lines shrink to a single one, with none left at the start or end.

What to do
Blank lines
Your text
Result
Lines in
0
Lines out
0
Blank lines in
0
Longest line
0

Everything runs in your browser. What you type never leaves this device.

Features

  • Removes empty lines and lines with only spaces, tabs or zero-width spaces

  • Or keep exactly one blank line between paragraphs

  • No blank lines left at the start or end

  • Other lines are not changed

  • Copy or download the result

  • Runs in your browser: your text is never uploaded. Free, no signup

Common reasons

Lists pasted from Excel or a website

Remove the gaps so each line is one item, ready to paste back into a sheet.

Text from PDFs and emails

Close up the double and triple gaps that copying adds between paragraphs.

Code and config files

Drop blank lines from a list of IDs or environment values.

What counts as an empty line

Blank, not just empty

A line counts as blank when it has no characters, or only spaces, tabs, non-breaking spaces or zero-width spaces. Such lines look empty but are not, which is why some editors fail to remove them.

Two modes

  • Remove all: every blank line goes, so the text becomes one item per line.
  • Keep one between paragraphs: runs of blank lines become one, so paragraphs stay separated.

Other line tools

Remove Empty Lines - FAQ