Text · runs in your browser
List & Text Cleaner
Paste a messy list of emails, names, product codes or anything else, line by line, and tidy it in one go: remove duplicates and blanks, sort it, number it, wrap each line in quotes, or join everything with commas.
The order steps run in
Find & replace runs first, then trimming, then removing empty lines and duplicates, then sorting and reversing, and finally prefixes, numbering and joining. So a duplicate that only differs by trailing spaces is still caught, and numbering always follows the final order.
Frequently Asked Questions
How do I remove duplicate lines from a list?
Paste the list and tick 'Remove duplicate lines'. By default 'Apple' and 'apple' count as the same; untick 'Ignore case' to keep both. The first occurrence of each line is kept, in its original position unless you also sort.
How do I turn a column of values into a comma-separated list?
Paste the column, then choose 'Join with comma'. Add a prefix and suffix of ' to wrap each value in quotes, which is handy for SQL IN (...) lists or spreadsheet formulas.
What does natural sorting mean?
Numbers inside text are sorted by value, so 'item2' comes before 'item10'. Plain alphabetical sorting would put 'item10' first because it compares character by character.
Can I use regular expressions?
Yes. Tick 'Regex' and use JavaScript regex syntax; $1, $2 in the replacement refer to captured groups. If the pattern has an error, you'll see the message and the text is left unchanged.