Remove Blank Lines

Strip empty and whitespace-only lines from your text. Runs entirely in your browser.

Result

Processed on your device. This file is never uploaded.

  1. 1Paste your text into the input box.
  2. 2Optionally trim whitespace on the remaining lines.
  3. 3Copy the compacted result.

Closing the gaps

Text copied out of a PDF, an email or a spreadsheet often arrives padded with empty lines. This tool removes them in one pass — every line that is empty or contains only whitespace is dropped, and the real content is pulled together with its order intact.

Truly empty, not just invisible

The catch with blank lines is that many are not actually empty: they hold spaces or tabs, so a plain search for empty lines misses them. This tool judges a line by whether it has any non-whitespace content, so those invisible lines go too — and the optional trim tidies the survivors. It all happens on your device.

Frequently asked questions