Delete Empty List Items

Remove empty / whitespace-only / Unicode-whitespace items from any list. Trim-before-check and invert (show-only-empties) modes. Free, offline, client-side, instant, secure.

Remove empty entries from any separator-delimited list with 4 deletion modes (empty, whitespace-only, trim-before-check, Unicode-whitespace) and an Invert mode to show ONLY the empty items.

How to Use Delete Empty List Items

  1. Paste your list. Pick the separator (newline default).
  2. Tick which deletion modes to apply: completely empty (zero length), ASCII whitespace-only (spaces/tabs/newlines), trim before check (treats " " as empty even when "completely empty" is off), or Unicode whitespace (NBSP, em-space, zero-width-space, etc.).
  3. Tick Invert to flip behavior: instead of removing empties, output shows ONLY the empty items found.
  4. Live preview updates after 200 ms. Ctrl+Enter recalculates manually.
  5. Stats card shows original / empties found / removed / final counts. Useful for "is my data really mostly blank or did I miscount?"

Frequently Asked Questions

What’s the difference between “completely empty” and “whitespace-only”?

Completely empty: zero length. Occurs from consecutive separators (a,,b produces an empty "" between a and b) or trailing separators. ASCII whitespace-only: contains only space, tab, or newline characters (" ", "t", " n"). Both options can be enabled together (recommended for most cleaning tasks) or separately if you want fine control.

What’s “Trim before check”?

Strips leading/trailing whitespace from each item before checking if it’s empty. So " " becomes "" and gets caught by the “completely empty” rule. Subtly different from “ASCII whitespace-only” which checks against the original item. The combination is reliable: anything trimmable to zero length gets caught regardless of how it was specified. Most users want this AND the other two on together – that’s the “comprehensive cleaning” mode. The original spec listed this option but didn’t implement it.

What’s Unicode whitespace and why care?

JavaScript’s .trim() and s regex handle ASCII whitespace + a few others but NOT all Unicode whitespace. Common offenders that .trim() leaves untouched: NBSP (U+00A0, non-breaking space, often inserted by Word/Outlook copy-paste), em-space (U+2003), thin space (U+2009), zero-width-space (U+200B, completely invisible). Actually .trim() in modern browsers DOES strip these – but checking via length after .trim() doesn’t help if the item was, say, "a​b" (a, ZWS, b) – that’s not empty. The toggle specifically detects items that are ENTIRELY made up of Unicode whitespace.

What’s Invert mode for?

Outputs ONLY the empty items instead of removing them. Use cases: counting how many empties were really in your data, exporting blank rows for separate analysis, debugging “where did my data come from?” issues. With Invert on, the stats card shows the SAME numbers but the output is the inverse of what it would normally be.

Does it preserve item order?

Yes. Items are filtered in their original positions; non-empty items keep their relative order. No sorting unless you pipe the output through a different tool. The separator is preserved exactly (multi-character custom separators not supported – only the 6 listed).

What about items with leading/trailing spaces (” apple “)?

With default settings, kept (only entirely-empty or entirely-whitespace items are removed). With Trim before check on, the item " apple " has content after trim, so it’s STILL kept – Trim only affects the empty-check, not the output. If you want to also strip spaces from kept items, run the output through a “trim list items” sibling tool.

What if all items are empty?

Output is empty. Stats card shows: original = N, empties = N, removed = N, final = 0. With Invert on, output is the original list (all items were kept because they were all empty).

How fast is processing?

O(n) – splits the input by separator once, filters in a single pass, joins once. 100,000-item lists process in ~50-100ms on a typical desktop. The Unicode whitespace regex is a slightly more expensive check than length === 0 but only runs when that toggle is on.

Is my data secure?

Yes. All processing happens in your browser. Your list never leaves your device. Download is generated in-memory and offered locally.