Skip to content
Text Cleanup Tools

Text Cleanup Tools › Spaces and line breaks

Remove Blank Lines

Delete empty rows from a list or document, or squeeze long runs of blank lines down to one.

Processed on your device. Nothing is uploaded or stored on a server.

How it works

  1. Paste text that has gaps between lines.
  2. Pick "Remove all" for a tight list or "Collapse" to keep paragraph spacing.
  3. Copy the result.

Example

Before
Apples


Bananas
   
Cherries



Dates
After
Apples
Bananas
Cherries
Dates

What this tool does

Exports, logs and copied web pages often come with empty rows between every real line. A line that holds only spaces or tabs looks empty on screen but is not empty to a computer, which is why some cleaners miss them. Here a line counts as blank if it contains nothing but whitespace. In collapse mode the first blank line in each run is kept, so paragraphs remain separated but triple gaps shrink to a single gap. If you are cleaning a list for a spreadsheet, remove all blank lines first and then remove duplicates.

Common problems

A line that looks empty is still there

It probably contains a hidden character such as a zero-width space. Run the hidden character remover first, then remove blank lines.

I want exactly one blank line between paragraphs

Use collapse mode. Every run of blank lines becomes one.

Questions

Does it delete lines that have only spaces?

Yes. A line of whitespace is treated as blank.

Does it change the order of my lines?

No. Non-blank lines stay in their original order.

Can I remove blank lines from a CSV?

Yes, as plain text. Paste the CSV, remove blank lines and copy it back. Data inside quoted fields that spans lines would also be affected, so check those files first.

Related tools

Last reviewed 2026-10-14.