Remove Empty Lines
Remove empty lines from text online: delete blank and whitespace-only lines, or keep a single blank line between paragraphs. Free, instant and private.
How to use Remove Empty Lines
- 1Paste your text or open a file.
- 2Choose whether to remove every empty line or keep one between paragraphs.
- 3Copy the result; the summary shows how many empty lines were removed.
What makes it better
- Treats whitespace-only lines as empty
- Option to keep one blank line between paragraphs
- Does not touch the text on your other lines
- Works on large pastes
About Remove Empty Lines
Remove Empty Lines deletes every blank line and every line that only contains spaces or tabs, leaving your real lines in their original order. If you still want paragraphs to stay separated, keep a single blank line between them instead.
Common uses
- Compact a list copied from a web page that has gaps between every item.
- Clean up log output or exported data with stray blank lines.
- Reduce several blank lines to one before publishing an article.
- Remove empty rows from text pasted out of a spreadsheet.
Example
Input
First line Second line Third line
Result
First line Second line Third line
Good to know
- A line with only spaces or tabs counts as empty. Non-breaking spaces and other Unicode spaces also count only if you first run Remove Extra Spaces, which converts them.
- Spaces at the start or end of the lines you keep are not trimmed.
- The result has no trailing line break at the end.
Remove Empty Lines FAQ
How do I remove blank lines from text?
Paste the text and the blank lines disappear immediately. Lines that contain only spaces or tabs are removed too.
Can I keep one blank line between paragraphs?
Yes. Turn on “Keep one blank line between paragraphs”. Runs of blank lines collapse to a single one, and blank lines at the very start or end are dropped.
Why are some lines that look empty not removed?
They probably contain a non-breaking space or another special space character. Tick “Remove extra spaces” in the cleanup steps first, which converts those into normal spaces.
How is this different from Remove Line Breaks?
This tool only deletes the empty lines. Every other line stays on its own row; Remove Line Breaks would merge them all into one.