About Line Sorter & Deduplicator
Sorts alphabetically or by length, strips duplicates and blank lines, trims stray whitespace, and reverses or shuffles order, with case sensitivity as a toggle. The usual reason to reach for it is a list pasted out of a spreadsheet or a log.
Paste a list and this tool reorders it any way you need: alphabetically A→Z or Z→A, by line length, reversed, or randomly shuffled. In the same pass it can remove duplicate lines, drop empty lines and trim stray whitespace, with an optional case-insensitive mode so 'Apple' and 'apple' are treated as the same entry.
It is the fast way to clean a keyword list, tidy a CSV column, dedupe an email or URL list, or randomise names for a draw. Sorting uses natural ordering, so 'item2' comes before 'item10' rather than after it.
Sorting by raw character codes is not alphabetical order, and the difference shows immediately. Byte order puts every capital letter before every lowercase one, so Zebra lands before apple — correct by code point and wrong by any human expectation. Proper alphabetical ordering is locale-aware, and the right answer genuinely differs by language: Swedish places å, ä and ö after z, while German files them alongside a and o. There is no single universal ordering to fall back on.
Deduplication needs the same care about what counts as identical. Whether entries differing only in case are duplicates depends entirely on the data — for email addresses usually yes, for case-sensitive identifiers usually no. Trailing whitespace is the quieter culprit: two lines that look the same but differ by one invisible space are distinct strings, and both survive a dedupe that would otherwise have caught them.
Common use cases
- Cleaning an email or subscriber list before an import, where duplicates cost money or trigger a spam complaint.
- Tidying a keyword list exported from a research tool that arrives with repeats and stray blank lines.
- Deduplicating URLs collected from a crawl or a spreadsheet column before processing them.
- Alphabetising a reference list, glossary or set of options so a reader can scan it.
- Randomising an order for a draw, a rota or a review assignment.