How to Remove Blank Lines from a List

A list copied from a PDF, a spreadsheet, or an email often comes with stray empty lines scattered through it - gaps left over from page breaks, merged cells, or formatting that doesn't survive the copy-paste. They're easy to miss until an import script chokes on them or a mail merge sends a message to a blank name.

Quick answer

Paste your list into Text Fixer. Blank lines are removed automatically by default, with no option to enable - it's the tool's standard behavior. If you actually want to keep blank lines (to preserve spacing between sections, for example), check Keep Blank Lines in the options panel.

Remove blank lines now. Free, nothing to install.

Open Text Fixer →

The fastest way: just paste it in

Unlike most of Text Fixer's other cleanup options, this one needs nothing turned on. Paste the list in and every line that's empty, or contains only whitespace, is already gone from the output. Copy the result and that's the whole process.

What actually counts as a "blank" line

A line doesn't need to be zero-length to count as blank - a line that contains only spaces or tabs, with nothing else, is treated as blank too and gets removed the same way as a truly empty line.

Text like this, with blank and whitespace-only lines mixed in:

apple
banana

cherry

date

comes out as:

apple
banana
cherry
date

When you need more control than "remove everything"

Sometimes you don't just want blank lines gone, you want to see what was removed, or you're cleaning up a list alongside other issues (null-like values, currency symbols, inconsistent casing) in one pass. Two options for that:

  • Use Filter Lines with the "Is blank" match type set to Remove - this keeps the removed blank lines visible in a separate panel rather than just discarding them.
  • Use List Data Cleaner if you're already running a bigger cleanup pass (trimming, null values, date formats) - it has its own dedicated Remove Blank Lines toggle alongside those other fixes.

Cleaning up a messier list than just blank lines?

See the full guide to cleaning up a list - trimming, deduplicating, fixing case, and more.

Read the guide →

Frequently Asked Questions

How do I remove all blank lines from a list at once?
Paste the list into Text Fixer. Blank lines are removed automatically, with nothing to enable - just copy the output.
Does Text Fixer remove blank lines by default?
Yes. Unlike most cleanup options, blank-line removal is on unless you turn it off. Check Keep Blank Lines in the options panel if you specifically want empty lines preserved in the output.
What if a line only contains spaces, not actually empty?
It still counts as blank and gets removed. A line made up entirely of spaces or tabs, with no other characters, is treated the same as a zero-length line.
Can I see which lines were removed instead of just deleting them?
Yes. Use Filter Lines instead, set the match type to "Is blank" and mode to Remove - the blank lines that were taken out show up in a separate panel rather than disappearing entirely.
How do I remove blank lines as part of a bigger cleanup?
If you're already trimming whitespace, replacing null-like values, or fixing dates in the same list, use List Data Cleaner instead of Text Fixer - it has a dedicated Remove Blank Lines toggle alongside those other fixes, so everything applies in one pass.
Will this remove lines that have placeholder text like "N/A" or a single dash?
No, those aren't blank lines, they contain visible characters. To remove placeholder or null-like values specifically, use List Data Cleaner's null-value replacement instead.
Does removing blank lines change the order of the remaining lines?
No. The remaining lines keep their original order, with the gaps simply closed up - nothing is re-sorted or re-arranged.

Share this tool

Featured on ToolDirs
© 2026 ListDiff

Free online list and text processing tools.