Remove Blank Lines
Remove or collapse blank lines in a block of text.
Remove all
Collapse consecutive
Input
Result
line one
line two
line three
Lines removed: 3
This tool clears out extra blank lines from text. "Remove all" mode deletes every blank or whitespace-only line — handy when you want the most compact text possible. "Collapse consecutive" mode reduces runs of several blank lines in a row down to one — this keeps paragraph breaks while trimming the extra empty space.
Useful for cleaning up text pasted from a PDF or Word document, preparing data for import, and working with logs or config files that accumulated stray line breaks.
Everything runs right in your browser — your text is never sent anywhere. The number of removed lines is shown, and you can copy the result with one click.
Frequently asked questions
Yes. A line made up only of spaces or tabs counts as blank in both modes.
"Remove all" strips every blank line entirely. "Collapse" preserves paragraph structure: several blank lines in a row become one blank line, while single blank lines stay as they are.