Skip to the content

Remove Empty Lines

Delete the blank lines from a text, including lines that only hold spaces or tabs. The other lines are left exactly as they are.

Spaces and line breaks
Characters
Characters before
0
Characters after
0
Removed
0
Share this tool:TwitterFacebookLinkedInWhatsAppEmail

Which lines count as empty

Before
First item Second item Third item
After
First item Second item Third item

A line is empty when there is nothing on it, and also when there are only spaces or tabs on it. The second kind is the one that survives a simple search for two line breaks in a row, because the line is not really empty. In the example the line above "Third item" consists of three spaces, and it goes like the others.

Lines with text on them are not changed in any way. Their spaces, their indentation and their order stay as they are.

One thing does count as text: an invisible character such as a zero-width space. A line that holds only that looks empty and isn't. If a blank line refuses to go, tick Remove invisible characters as well.

Removing every empty line also removes the gaps between paragraphs. If you only want to get rid of the excess, untick this option and tick Keep one empty line at most. Runs of blank lines then shrink to a single one, and the paragraphs stay recognisable.

All fourteen clean-ups, to combine as you like, are on the Text Cleaner page, which also remembers what you ticked.

See all 9