What it does
This tool removes lines that contain nothing, or nothing but spacing. It works on whole lines, so it does not delete spaces between words or empty fields inside a row. Paste a document, a list, a log excerpt, or a copied spreadsheet, and the result is the same text with the empty rows taken out.
Empty lines are useful in prose and code, and they are also the first thing that breaks when text moves between systems. A PDF copy adds a blank line after every visual line, a chat message doubles the gaps, and a CSV export leaves a trail of empty rows. Removing them is usually a formatting decision, not a content decision, which is why the words and their order stay untouched.
Blank vs whitespace-only
A truly empty line has no characters between two line breaks. A whitespace-only line contains spaces, tabs, or another kind of invisible spacing. The difference matters. In Markdown, a line containing a few spaces can still be a paragraph separator or a hard break. In Python, indentation is syntax. In a table copied from a web page, a line of spaces may be a visual gap rather than a missing row.
Turn on “treat spaces and tabs as an empty line” when you want the aggressive version. Turn it off when indentation is part of the content. The tool shows how many lines it removed and how many remain, so you can compare the count with what you expected before copying the result.
Collapse or delete
Deleting every blank line is the right choice for a list or a log. Collapsing runs is better for prose, where one blank line means “new paragraph” and five blank lines mean “the paste went wrong.” Collapse keeps one separator per run, removes extra separators, and trims blank lines from the beginning and end.
The two modes answer different questions. “Delete” asks, “What text is left if I remove every empty row?” “Collapse” asks, “How do I keep the paragraph structure without the noise?” If the output is going back into a document, collapse is usually the gentler option.
Examples
Before
First heading
A paragraph with a blank line before it.
Another paragraph after a whitespace-only line.
A final note.After
First heading
A paragraph with a blank line before it.
Another paragraph after a whitespace-only line.
A final note.All four gaps disappear: the empty line after the heading, the line containing spaces, the double blank line, and the final trailing separator. The words and their order are unchanged. Because trimming is off, any indentation on the remaining lines would survive.
Before
First heading
A paragraph with a blank line before it.
Another paragraph after a whitespace-only line.
A final note.After
First heading
A paragraph with a blank line before it.
Another paragraph after a whitespace-only line.
A final note.The single gap after the heading is already a paragraph break, so it stays. The whitespace line becomes a normal separator, the double gap becomes one, and the trailing gap is removed. The result is shorter without losing the distinction between paragraphs.
Limits worth knowing
- It edits lines, not records. A CSV row with empty fields is not an empty line. A quoted field containing a line break is treated as separate lines, because this tool does not parse CSV semantics.
- Trimming can break indentation. Turning on “trim spaces from the lines that remain” also removes the leading spaces on non-empty lines. That is useful for pasted prose and destructive for code, YAML, and nested lists.
- Blank lines can carry meaning. In Markdown, a blank line separates blocks. In source code, it separates functions. In poetry, it separates stanzas. Keep a copy of the original if the layout is part of the work.
- Line endings are normalized. CRLF and CR are converted to LF. Most systems accept LF, but a Windows-only pipeline may want the original convention back.
- No undo beyond the browser. The tool does not store history. Copy the result before closing the tab, and keep the original if you may need to compare.
Page updated