About this tool
Text copied from PDFs, emails or web pages often arrives with blank lines scattered everywhere. This tool removes them, optionally treating lines that contain only spaces or tabs as empty as well. If you'd rather keep paragraphs apart, switch to collapsing so that each gap shrinks to exactly one blank line.
How to use Remove Empty Lines
- Paste the text with unwanted blank lines.
- Decide whether whitespace-only lines count as empty, and whether to keep single gaps.
- Copy the compacted text.
Frequently asked questions
What's the difference between removing and collapsing?
Removing deletes every blank line, so all lines sit directly under each other. Collapsing keeps one blank line wherever there was a gap, which preserves paragraph breaks.
Why didn't a line that looks empty get removed?
It probably contains spaces, tabs or an invisible character. Turn on the whitespace option, or inspect it with the Whitespace Visualizer.