Sort a list of lines online


Paste your list with one item per line and pick a sort: alphabetical A-Z or Z-A, numerical ascending or descending, by length, reversed or shuffled at random. Natural sorting puts file2 before file10. The sorted list appears right away in your browser, ready to copy or download.
- ✅ Free
- 🔒 No sign-up
- 📱 Works on mobile
- ⚡ Instant results
🔒 Everything runs in your browser. Your data and files never leave your device.
Sort types explained
| Sort | Rule | Example |
|---|---|---|
| A → Z | alphabetical order, numbers inside text compared as numbers | apricot, banana, cherry |
| Z → A | reverse alphabetical order | cherry, banana, apricot |
| Numbers ↑ / ↓ | reads the first number on each line | 2, 9, 10, 100 |
| Length | number of characters in the line | a, bb, ccc |
| Reverse | flips the current order without sorting | 3, 2, 1 |
| Shuffle | random order (Fisher-Yates shuffle) | different every time |
Alphabetical vs natural sorting
A plain alphabetical sort puts "file10" before "file2" because "1" comes before "2". This tool uses natural sorting: numbers inside text are compared as numbers, so "file2" lands before "file10". Accented letters sort next to their base letter, so "café" sits with the words starting with "c".
natural order: file1 < file2 < file10 (not file1 < file10 < file2)
In numerical mode, lines with no number go to the end, sorted alphabetically among themselves. Decimals like 2.5 and negatives like -3 are handled.
3 real-life examples
A list of names
"Louis, Eloise, anna, Zoe" (one per line) becomes "anna, Eloise, Louis, Zoe" in A → Z: case is ignored by default, so "anna" comes first.
A list of prices
The lines "12.50", "9", "100" and "2.5" give "2.5, 9, 12.50, 100" in numerical ascending order. An alphabetical sort would have put "100" first.
Drawing teams at random
For 30 students, click Shuffle: the list is reordered at random. The first 5 names make team one, and another click redraws everything.