List Cleaner
Deduplicating and sorting a list are the jobs people do in a spreadsheet and get subtly wrong. A trailing space makes two identical entries different, so the duplicate survives. Sorting numbers as text puts 10 before 2. Both are handled here, and the result is traced back line by line: nothing may be invented, and nothing may vanish unaccounted for.
What this generator does
Trims each line, drops the blanks, and then removes duplicates, sorts or counts as you ask — keeping the first of each duplicate so the original order survives.
How to use this tool
- Paste your list, one item per line.
- Choose what to do with it.
- Tick the box if capitals should count as different.
- Copy the cleaned list, or read the counts.
Understanding the controls
- Your list
- One item per line, up to twenty thousand. Spaces at either end are tidied away, which is where duplicates usually hide.
- What to do
- Remove duplicates, sort alphabetically, sort as numbers, sort by length, reverse, tidy the spacing only, or count how many of each there are.
- Capitals count
- Off by default, so Apple and apple are the same item. Turn it on where the difference matters.
Common use cases
- Removing duplicate email addresses or names from a list
- Sorting a list of items alphabetically or by number
- Finding out how many times each entry appears
- Tidying a list copied out of a document or a spreadsheet
- Sorting a list of numbers without them coming out in text order
How this generator works
Three counts are checked. Every line in the result must appear in the list that was pasted, so nothing can be invented. The lines kept and the lines removed must add back up to the number pasted, so nothing can quietly vanish. And where the operation is a sort or a reverse, the result must hold exactly the same lines as the input — compared line for line, not merely counted — so a sort cannot lose an entry.
Randomness and fairness
Nothing is random. The same list and operation always give the same result, and the order of equal items is never shuffled.
For how randomness is produced across the whole site, see how Generate Random works.
Limitations and good to know
- Whole lines are compared, so two entries differing by an internal space stay different.
- Alphabetical sorting uses English rules, which put accented letters where English expects them rather than where another language would.
- Blank lines are dropped and counted rather than kept.
- Twenty thousand lines at most.
Privacy and your data
Your list stays in your browser. Nothing you paste is transmitted or stored.
Related generators
- Markdown Table GeneratorTurns pasted rows into a tidy Markdown, HTML, plain-text or CSV table, and reads the result back to prove nothing was mangled.
- Text Case ConverterRewrites text as camelCase, snake_case, kebab-case and five others at once, splitting names the way a person would.
- CSV Test Dataset GeneratorA small fictional CSV sample, including one deliberately messy row, for exercising a parser.
- List Randomiser & ShufflerShuffle any list into a new random order — great for randomising order, not just picking winners.