At One Place

Remove empty lines

Delete blank lines from a block of text, optionally collapsing runs to one.

How it works

Removes blank lines from pasted text. Lines containing only spaces or tabs count as blank, which is what people usually want — a line that looks empty but holds a stray space is still clutter.

The collapse option is the gentler version: instead of removing every blank line, it reduces runs of two or more down to a single blank, so paragraph breaks survive while double and triple spacing does not.

This tool runs entirely in your browser. Nothing you enter is sent to a server, logged or stored, and the page keeps working with the network disconnected.

Common questions

Does a line with only spaces count as empty?
Yes. Lines containing nothing but whitespace are treated as blank, since that is almost always the intent.
How do I keep paragraph breaks?
Use the collapse option, which reduces runs of blank lines to one instead of removing them all.

Related pages