Remove Empty Lines

Paste text to delete blank and whitespace-only lines, or collapse runs of blank lines down to a single one.

Remove Empty Lines

🔒 Nothing you enter is sent anywhere or stored. All processing happens in your browser.

How it works

Text copied from PDFs, emails and web pages is often littered with blank lines that break up the flow and waste space. This tool cleans them out in a single step, either deleting every empty line or tidying up excessive gaps.

In Remove all blank lines mode, any line that is empty or contains only spaces or tabs is deleted, packing the remaining lines together. In Collapse to single blank mode, runs of two or more blank lines are reduced to exactly one — perfect when you want to keep paragraph breaks but lose the extra padding, and it also trims blank lines from the very start and end.

The result updates live and a counter tells you how many lines were removed. Everything runs locally, so your text is never uploaded.

Examples

Copied PDF text → Remove all blank lines → a tight, gap-free block.
Draft with double-spaced paragraphs → Collapse to single blank → clean paragraph spacing.
Exported list → strip blanks → a ready-to-sort list.

Frequently asked questions

Does it remove lines that only contain spaces?
Yes. Lines made up entirely of spaces or tabs are treated as blank and removed, not just completely empty lines.
What is the difference between the two modes?
'Remove all blank lines' deletes every empty line. 'Collapse to single blank' keeps one blank line where there were several, preserving paragraph breaks.
Does collapse mode trim the top and bottom?
Yes. It also removes blank lines at the very start and end of the text so there is no leading or trailing whitespace.
Will it change my actual content?
No. Only blank lines are affected — every line with real text is kept exactly as it was.
Is my text uploaded?
No. All processing happens in your browser, so nothing you paste leaves your device.