Sort Lines Alphabetically
Paste a list and sort it A→Z, Z→A, numerically, by line length, or shuffle it into random order. Sorting uses locale-aware comparison, so accented characters land where a reader expects them.
The sort modes
- A → Z and Z → A — alphabetical, using proper locale rules so é sorts next to e rather than after z.
- Numeric — compares the leading number on each line, so 9 comes before 10. Plain alphabetical sorting puts "10" before "9", which is the single most common sorting complaint.
- Length — shortest line first. Handy for spotting outliers and truncated entries in scraped data.
- Shuffle — randomises order using a Fisher–Yates shuffle, for picking winners or randomising test data.
Why 10 sorts before 9
Alphabetical sorting compares character by character, and "1" comes before "9" in character order, so "10" lands before "9" exactly as "ab" lands before "b". This trips people up constantly with version numbers, invoice IDs, and file names. Switching to Numeric mode reads the number on each line and compares its value instead. If your lines mix text and numbers — like "Chapter 10" — numeric mode uses the first number it finds.
Case sensitivity
With case sensitivity off, sorting is what most people expect: "apple", "Banana", "cherry" in that order. Turn it on and strict character order applies, which places every capitalised word before every lowercase one — "Banana" then "apple" then "cherry". That behaviour is correct for programming contexts where identifiers are compared literally, and confusing almost everywhere else, so it is off by default.