Remove empty items from a list

Paste a list and get it back with every empty or whitespace-only line removed. Whitespace-only lines count as empty (trimmed before the check). No options, no configuration - the drop is unconditional.

Input
Ready
Output
Live

A blank-line stripper

The tool splits on newlines and keeps every line where `line.trim().length > 0`. That means a line is "empty" if it contains nothing, or only spaces, tabs, or other whitespace. The line is dropped - the item content of non-empty lines is preserved verbatim.

This is the canonical first step in any cleanup pipeline. A paste from Excel / Slack / email often has stray blank lines; dropping them collapses the list to just the data. Chain with trim (before or after) to clean up whitespace inside items too.

The reverse is Find empty items - it reports where the blanks are instead of dropping them, useful for auditing a dataset before you change it.

How to use remove empty items from a list

  1. 1Paste your list into the input panel
  2. 2Output is your list with every blank or whitespace-only line dropped
  3. 3No options to configure - removal is unconditional
  4. 4Chain with trim to also clean up whitespace inside items

Keyboard shortcuts

Drive ListShift without touching the mouse.

Shortcut Action
Ctrl ZUndo last input change
Ctrl Shift ZRedo
Ctrl Shift EnterToggle fullscreen focus on the editor
EscExit fullscreen
Ctrl KOpen the command palette to jump to any tool
Ctrl SSave current pipeline draft Plus
Ctrl PRun a saved pipeline Plus

What this tool actually does

One operation, no options.

Drops every empty and whitespace-only line

A line is dropped if `line.trim()` yields an empty string. That catches completely blank lines plus lines containing only spaces, tabs, or mixed whitespace.

Preserves item content verbatim

Non-empty lines are kept exactly as typed - no trimming, no case changes, no reformatting. If you also need whitespace stripped inside items, chain trim.

Collapses runs of blanks

Three consecutive blank lines, one blank line, a blank at the end, a blank at the start - all removed equally. The output has no blank lines anywhere.

Handles Windows CRLF and Unix LF line endings

The splitLines helper normalises `\r\n` and bare `\r` to `\n` before splitting. A Windows paste produces the same output as a Unix paste.

Runs in your browser

Pure client-side. Your list never reaches our servers - useful for internal data with blank rows that would be awkward to paste externally.

Worked example

Three items, four blank (or whitespace-only) lines - all blanks dropped.

Input
Apples

Oranges



Cherries
Output
Apples
Oranges
Cherries

Behavior reference

No user options. These are the fixed rules.

Rule What it does Example
Drop empty lines Every line where `line.trim() === ""` is dropped Fully blank lines removed
Drop whitespace-only lines Lines containing only spaces / tabs also count as empty ` ` (three spaces) removed
Preserve item content Non-empty lines emit verbatim - no trimming ` Apple ` stays as ` Apple ` (use trim to clean)
CRLF normalisation Windows and Unix line endings handled identically Same output from either paste source

FAQ

Does this trim whitespace inside items?
No. It only drops lines where `line.trim()` is empty. The content of non-empty lines is preserved exactly as typed. For internal whitespace cleanup, chain trim before or after - or use a saved Pipeline in Plus to do both in one click.
What counts as "empty"?
A line where `line.trim()` returns an empty string. That includes completely blank lines, lines with only spaces, lines with only tabs, and lines with mixed whitespace characters (non-breaking space, etc.).
How is this different from Collapse blank lines?
This tool drops *every* blank line. Collapse blank lines caps consecutive blanks at N (e.g. collapse 3 blanks down to 1). Use collapse when you want *some* spacing between items; use this when you want no spacing at all.
Does this tool have any options?
No. The operation is deliberately single-purpose - a blank line is dropped, no conditions. For finer control (drop only lines that are exactly empty but keep whitespace-only lines, for example), use Filter with a regex.
Can I find the empty lines instead of dropping them?
Yes, use Find empty items - it reports the positions of blank lines without modifying the list.