Line Sorter and Duplicate Remover
Sort a list, strip out duplicates and blank lines, trim stray whitespace, number the rows or shuffle them — all in your browser.
How to sort and clean up a list
- Paste your list, one item per line. It can be anything — names, tags, URLs, order numbers, file names.
- Press the operation you want: sort, remove duplicates, remove empty lines, trim whitespace, number, reverse or shuffle.
- Chain the steps. Each one reads the original box and writes to the result box, so you can trim the whitespace, then remove the blanks, then sort, checking the count each time.
- Copy the result or download it as a text file.
Every step reports how many lines it changed, which is the quickest way to confirm that a de-duplication did what you expected before you paste the list somewhere it matters.
Why this is more fiddly than it looks
Sorting a list by hand is easy for twenty items and impossible for two thousand. The difficulty is not the ordering itself, it is everything around it: the same address entered twice with different capitalisation, a blank line left at the end of the file, an invisible trailing space that makes two identical-looking entries differ by one byte. Those are the reasons a de-duplication that "should" have worked leaves the list the same length.
The order the operations are applied in matters, which is why each is a separate button rather than an all-in-one action. Trimming whitespace first lets the de-duplicator recognise two lines that only differed by a stray space. Removing the empty lines first gives you an accurate count. Sorting case-insensitively, with numbers compared as numbers, puts item2 before item10 — the order a person would put them in, and not the order a plain text sort would produce.
Shuffling is the odd one out. It reassigns the lines using the browser's cryptographic random number generator, which makes it genuinely useful for picking a random winner from an ordered list, or for removing the positional bias from a list that someone pasted in a hurry.
Line tools FAQ
Does sorting ignore capital letters?
Yes. The sort is case-insensitive and compares digits as numbers, so item2 comes before item10. That is almost always what you want for names, tags or file names.
What counts as a duplicate?
Two lines that are identical character for character. Apple and apple are kept separately, as are two otherwise identical lines where one has a trailing space — unless you trim the whitespace first.
Will the tool change my original text?
No. The top box is never modified. Each operation writes to the result box, so you can keep working from the original until you are happy with the output.
Is my list uploaded?
No. Everything runs in your browser, so a list of email addresses or customer names never leaves your machine.
Related tools
- Word Counter — check the length of a list or a draft.
- Case Converter — normalise the capitalisation before sorting.
- Lorem Ipsum Generator — filler text for mockups.
- All text tools — four browser-based utilities.