Worked example: file names and prices
Four chapter files sorted alphabetically come out as Chapter1.docx, chapter10.docx, chapter11.docx, chapter2.docx: the 1 in “chapter10” is compared with the 2 in “chapter2”, so ten lands before two. The natural sort gives Chapter1.docx, chapter2.docx, chapter10.docx, chapter11.docx, the order you would expect. For a list of prices, sorting by number with Reverse ticked puts the most expensive first: $1,250 laptop; $450 monitor; $89 headphones; $15.50 cable; free sticker. The line with no number at all stays at the end.
The sort orders
| Order | What it does | Good for |
|---|---|---|
| Natural | Letters A–Z, digits by their value | File names, versions, addresses, chapter lists |
| Alphabetical | Character by character, A–Z | Word lists, glossaries, names |
| By number | The first number on each line | Prices, scores, measurements |
| By length | Shortest line first | Finding odd entries, keyword lists |
| Shuffle | A random order, every order equally likely | Draws, quizzes, running orders |
Letters from other languages
The alphabetical and natural orders follow the Unicode collation rules for English, so accented letters sort next to their plain letter (é with e) rather than after z, as a simple character-code sort would put them. Other languages have their own conventions (Swedish puts å, ä and ö after z), so for lists in those languages check the result.
Shuffling fairly
A shuffle is only fair if every order is equally likely. Many quick methods, such as sorting by a random number, are subtly biased. This tool walks the list from the end, swapping each line with a randomly chosen line at or before it (the Fisher–Yates method), using random numbers from your device’s security system rather than a predictable formula. Press “Shuffle again” for a new order; nothing is stored, so nobody can repeat or predict it.
Everyday uses
- Bibliographies and glossaries: paste the entries and sort them alphabetically; accented names sort with their plain letters.
- Leaderboards and price lists: sort by number, largest first, without having to move the figures to the start of each line.
- Draws and running orders: shuffle a list of names to pick a winner, a speaking order or teams, fairly and without anyone being able to predict it.
- Tidying code: sort import lines, CSS properties or configuration keys, and remove duplicates at the same time.
- Spotting oddities: sort by length to bring empty-looking lines, very short entries and pasted mistakes to the top.
Nothing is sent anywhere, so lists of names and e-mail addresses stay on your device.
Capital letters and ties
By default capitals are ignored when deciding the order, so “apple”, “Banana” and “cherry” sort A, B, C, the way a dictionary or an index does. With “Capitals first” ticked, a word in capitals comes before the same word in small letters (“Apple” before “apple”), which matches what many programming tools and older spreadsheets do. Lines that are exactly the same stay next to each other, so the remove-duplicates option can drop the extra copies in the same step. When sorting by number, lines with the same number are put in natural order among themselves, and when sorting by length, lines of the same length are too.
Related tools
Sources
Checked on November 26, 2026:
- Unicode Technical Standard #10: Unicode Collation Algorithm
- The Fisher–Yates shuffle (Knuth, The Art of Computer Programming, vol. 2, Algorithm P)
- W3C Web Cryptography API: random values from a cryptographically secure source
Frequently asked questions
How do I put a list in alphabetical order?
What is natural sort?
How does sorting by number work?
Is the shuffle really random?
Do capital letters change the order?
Can I sort and remove duplicates at the same time?
Last updated: 2026-11-26