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.
Sort any list alphabetically A–Z or Z–A with natural, numeric-aware ordering, and dedupe or shuffle it in the same pass. It all runs in your browser.
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
- Alphabetising a bibliography, glossary or index
- Ordering a name or attendee list before sharing it
- Sorting config keys or CSV headers to make a diff readable