Skip to content
TabKiwiTabKiwi

Remove Empty Lines

Strip blank lines out of text, or squeeze runs of them down to a single empty line.

TextRuns in your browser. Your files never leave this device.
Loading tool…

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

  1. Paste the text with unwanted blank lines.
  2. Decide whether whitespace-only lines count as empty, and whether to keep single gaps.
  3. 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.

More Text tools

View all 60 →