List Cleaner

Paste a list, tick the clean-up steps you need, and press Clean list. Duplicates, blank lines, and stray spaces go, and the result can be sorted, filtered, quoted, or joined with commas.

Try an example

Separate several words with commas.

More formatting options

About this list cleaner

Lists copied from spreadsheets, emails, and exports are rarely clean: the same entry appears twice with different capitals, some lines are blank, and others carry trailing spaces. This tool fixes all of that in a single pass and then shapes the result: keep or remove lines that contain certain words, strip a common prefix, change the letter case, sort it, and output it one per line or joined with commas, wrapped in quotes and numbered if you like. The steps always run in the same order, so the same settings give the same result.

How to clean a list

  1. Paste your list. Put one item per line, or press an example. An example only fills the box.
  2. Pick the clean-up steps. Tick remove duplicates, trim spaces, and remove empty lines, and decide whether matching is case-sensitive.
  3. Sort, filter, and format. Choose a sort order and case change, type words to keep or remove, and open More formatting options for prefixes, quotes, numbers, and the delimiter.
  4. Press Clean list. Copy the result or download it.

Frequently asked questions

In which order are the steps applied?

Trim spaces, remove empty lines, remove duplicates, keep or remove lines by word, remove the prefix and suffix, change case, sort, and finally add the prefix, suffix, quotes, and numbers and join the items.

Does Case-sensitive affect the word filters?

Yes. With Case-sensitive on, "Apple" and "apple" are different items and a filter for "shoes" does not match "Shoes". Turn it off to ignore capitals in both duplicates and filters.

How do I turn a column into a comma-separated list for SQL or code?

Choose Single quotes and Comma and space, which gives 'a', 'b', 'c'. For a complete SQL IN (…) clause, use Text to SQL List.

How does numeric sorting treat text lines?

Each item is sorted by the first number it contains; items without a number are placed after all numbers.

Is Shuffle truly random?

It uses a Fisher–Yates shuffle with your browser’s random number generator, so every order is equally likely. Press Clean list again for a new order.