🧹Empty Line Remover

Remove empty lines

How to use the empty line remover

Text copied out of a web page, a PDF, a chat export or a spreadsheet almost always arrives padded with blank lines you never asked for. This tool strips those lines out in one pass and reports how many lines went in, how many were dropped and how many remain.

A truly empty line and a whitespace-only line are not the same thing. The first contains no characters at all; the second contains invisible characters such as spaces or tabs. That is why there are three modes. The default removes both. "Remove only truly empty lines" keeps any line that still holds a space or a tab. "Collapse repeated blank lines into one" keeps your paragraph breaks while closing up oversized gaps.

Blank detection uses the JavaScript regular-expression whitespace class, so it also recognises the ideographic space (U+3000) produced by CJK input methods and the non-breaking space (U+00A0) that tags along when you copy from the web. Spaces inside a line are left untouched — use a whitespace cleaner if you also need to squeeze runs of spaces. Everything runs in your browser and nothing you paste is uploaded.

Frequently asked questions

Does a line with only spaces count as empty?

That depends on the mode. The default also removes lines that hold only spaces, tabs or ideographic spaces, while "Remove only truly empty lines" deletes lines with no characters at all.

How do I keep the gaps between paragraphs?

Choose "Collapse repeated blank lines into one". Runs of two or more blank lines become a single blank line, so paragraph breaks survive.