Sorting that matches how people read
Computers sort by character codes by default, which puts “Zebra” before “apple” and “item 10” before “item 2”. This tool uses the Unicode Collation Algorithm built into your browser, so:
- Alphabetical ignores case by default and handles accents properly (“é” sorts with “e”).
- Natural treats numbers as numbers: item 2, item 9, item 10.
- First number in line sorts by the first number each line contains (prices, scores, years) with lines without numbers at the end.
- Length and word count sort shortest first.
- Random shuffle uses an unbiased Fisher–Yates shuffle.
Language-specific alphabets
Alphabetical order differs between languages. Swedish puts å, ä and ö after z; Spanish treats ñ as its own letter after n; Czech sorts “ch” after “h”. Choose the Alphabet that matches your list.
Ignore leading “The/A/An” sorts titles the way libraries and music players do: The Beatles under B. Combine with Remove duplicates and Reverse as needed.
Worked example
Here is what the Sort Lines returns for its built-in example. Settings used: Sort by: Alphabetical (A–Z); Reverse: off; Case-sensitive: off. Click Try an example in the tool above to load it, then change it as you like.
Banana
Apple
cherry
item 10
item 2
The Zebra
apple
DateApple
apple
Banana
cherry
Date
item 10
item 2
The ZebraQuestions
How do I alphabetize a list?
Paste one item per line and keep “Alphabetical” selected. The sorted list appears instantly.
Why does “10” come before “2”?
In plain alphabetical order digits are compared one at a time. Choose “Natural” to sort numbers by their value.
Last reviewed · How Textkiln tools work