Remove Empty Lines
Delete the blank lines in a list, log or document, or just squeeze runs of blank lines down to one.
Your text stays in this browser tab. Nothing is uploaded, saved or logged.
How the Remove Empty Lines works
“Every empty line” removes all blank lines, leaving the text as a continuous block of lines. “Extra empty lines” keeps one blank line between blocks and collapses longer runs, which preserves paragraph structure.
A line that contains only spaces or tabs looks empty but is not; by default these are treated as empty too. Turn that off to remove only truly empty lines. Line endings from Windows, Mac and Linux are recognised and the output uses standard line breaks.
Lines with content are never changed, including their leading and trailing spaces. Use Remove Extra Spaces to tidy those.
How to use it
- Paste your text.
- Choose between removing every empty line or collapsing them to one.
- Copy the result.
Example
Every blank line, including the one with only spaces, is removed.
Input
Line one Line two Line three
Result
Line one Line two Line three
Frequently asked questions
Why do blank lines remain after I remove them?
They may contain spaces or tabs. Make sure “Treat lines with only spaces or tabs as empty” is on.
How do I keep paragraphs but remove the extra gaps?
Choose “Extra empty lines”. A single blank line stays between blocks and anything longer collapses to one.
Does it remove the trailing line break at the end?
In “every empty line” mode, yes. In collapse mode a final blank line is reduced to one.