Blank lines, removed or tamed
Empty lines creep in when copying from web pages, exporting from spreadsheets or merging files. This tool removes them in one step.
- Remove all deletes every blank line, leaving a compact list.
- Max one in a row keeps paragraph separation but collapses runs of two or more blank lines into one.
Lines that contain only spaces or tabs look empty but aren’t, to most software. With Treat whitespace-only lines as empty on (the default), they are removed too.
Related clean-ups
To join lines inside paragraphs, use Remove Line Breaks. To remove repeated lines, use Remove Duplicate Lines. To count lines and paragraphs before and after, use the Line & Paragraph Counter.
Where blank lines come from
Spreadsheet exports leave empty rows where cells were blank; web pages copied from a browser add blank lines around every block; email clients quote replies with spacing that doubles each time. In data files, blank lines can break imports and scripts that expect one record per line, so removing them is often the first step before sorting, deduplicating or loading the data elsewhere.
Worked example
Here is what the Remove Empty Lines returns for its built-in example. Settings used: Mode: Remove all; Treat whitespace-only lines as empty: on. Click Try an example in the tool above to load it, then change it as you like.
Line one
Line two
Line three
Line fourLine one
Line two
Line three
Line fourQuestions
How do I delete blank lines in text?
Paste it here with “Remove all” selected. Every empty or whitespace-only line is removed.
Can I keep single blank lines between paragraphs?
Yes. Choose “Max one in a row”.
Last reviewed · How Textkiln tools work