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.
- Runs in your browser
- Nothing uploaded
- Free, no sign-up
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
- Paste your list. Pick the separator (newline default).
- 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.). - Tick Invert to flip behavior: instead of removing empties, output shows ONLY the empty items found.
- Live preview updates after 200 ms. Ctrl+Enter recalculates manually.
- 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, "ab" (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.
Related Tools
Delete List Items →
Delete list items by pattern (5 match modes), line numbers, or ranges with live…
Count List Items →
Count list items with frequency analysis, duplicates, unique-only output, TSV export. Free, client-side, instant.
Delete List Separator →
Remove or convert separators in any list. Custom multi-char delimiters, replace-with mode (a,b,c →…
Group List Items →
Group identical items in a list and count how many times each one appears,…
Swap List Items Online →
Swap two items in a list by their positions, counting from 1, leaving the…
Trim List Items →
Trim the leading and trailing whitespace from every item in a list, keeping the…
Add List Prefix - Prepend Text →
Adds the same text before or after every item in a list, wraps items…
Alphabetize List Sort Items Online | A-Z →
Alphabetize list items instantly. Sort A-Z or Z-A, case-sensitive or not. Remove duplicates option.…
Change List Length →
Change List Length Truncate, pad, or cycle any list to a target length. Free,…
Change List Separator →
Change List Separator and Convert list separators between newline, comma, tab, semicolon, pipe, and…
Chunk List Text →
Split any list into fixed-size chunks with line/numbered/labeled/custom-separator output. Live preview, keep-or-drop trailing chunk.…
Colorized List Item →
Colorized list item online. Turn any list text into a colour-coded HTML block with…