Quick answer: paste your list into the sorter above, one item per line, and press the order you want. A → Z sorts the way people read, so "Chapter 2" comes before "Chapter 10". Blank lines are dropped and nothing else in your list is changed.
Sorting a list sounds trivial until the result looks wrong: "10" lands above "2", every capitalized word jumps ahead of the lowercase ones, or "$1,200" ends up between "1" and "2". Each of those comes from the sorter treating your text differently from how you read it. This page explains what each button does so you can pick the one that matches your list.
The seven sort orders
A → Z and Z → A
Alphabetical order using your browser's language rules, with two adjustments that match how people expect lists to look. Capital and lowercase letters are treated as the same letter, so apple and Banana stay in alphabetical order rather than all capitals coming first. Runs of digits are compared as numbers, so Chapter 2 sorts before Chapter 10. This is often called natural sort order. Accented letters sort next to their plain versions, so éclair appears among the E words.
Here is a sample list sorted A → Z:
apple
Banana
Chapter 1
chapter 2
Chapter 10
A plain character-by-character sort, which is what many spreadsheets and the default sort command can produce depending on settings, would put Chapter 10 before chapter 2 and might move every capitalized line to the top.
Numeric
Sorts by the first number in each line, smallest first. It ignores currency signs and thousands separators, so $1,200.50 rent is read as 1200.5, and it handles negatives and decimals. Lines with no number at all go to the bottom in alphabetical order. Use it for prices, scores, measurements and anything else where the value matters more than the text.
A mixed list sorts like this:
-3
0.5
item 2
2.5
9
10
1,000
$1,200.50 rent
banana
n/a
One limit: a comma is always read as a thousands separator. Lists that use a comma as the decimal mark, as much of Europe does (2,5), should have the commas replaced with full stops first, which the find and replace tool can do in one step.
Shortest first and Longest first
Sorts by the number of characters, spaces included. Lines of equal length keep their original order. Shortest first is useful for spotting junk entries in a messy export, since fragments like x or - float to the top. Longest first finds entries that are too long for a field, such as titles that will be cut off in search results or product names that overflow a label.
Randomize
Shuffles the list so that every possible order is equally likely. It uses the Fisher-Yates shuffle with random numbers from the browser's Web Crypto API. A common shortcut, sorting with a random comparison function, is biased: some orders come up far more often than others, so it should not be used for anything that needs to be fair. Use Randomize for picking a giveaway winner, setting a presentation order or assigning people to groups. Press it again for a new order.
Reverse order
Flips the list without sorting it, so the last line becomes the first. Use it on a list that is already in a meaningful order, such as a log or a timeline, when you want the newest entries at the top.
Sorting and removing duplicates
The sorter keeps every line, including repeats. If your list has duplicates, remove them first with the duplicate line remover, which can also sort A to Z in the same step. Sorting first can still help when you want to look at the duplicates before deleting them, because identical lines end up next to each other.
Doing it elsewhere
- Excel and Google Sheets: select the column and use Data > Sort. Both sort numbers by value when the cells are stored as numbers, and as text when they are not, which is the usual cause of "10 before 2" in a spreadsheet.
- Mac or Linux terminal:
sort list.txtfor text,sort -n list.txtfor numbers,sort -V list.txtfor natural order (GNU sort), andsort -R list.txtorshuf list.txtfor a random order. - Python:
sorted(lines, key=str.lower)for a case-insensitive sort.
Frequently asked questions
Why does 10 come before 2 in other sorters?
Because they compare text one character at a time, and the character 1 comes before 2. This sorter compares runs of digits as whole numbers in A to Z mode, and by value in Numeric mode, so 2 comes before 10.
Is the A to Z sort case-sensitive?
No. Capital and lowercase versions of a letter are treated as the same, so the list stays in alphabetical order regardless of capitalization.
Is Randomize fair enough for a giveaway?
Yes. It uses a Fisher-Yates shuffle with cryptographic random numbers, so every order is equally likely. Keep a copy of the original list and the result if you need to show how a winner was picked.
Does it remove duplicates or blank lines?
It removes blank lines but keeps duplicates. Use the duplicate line remover if you also want repeats taken out.
Is there a size limit?
No. Sorting happens in your browser. In testing, the same sorting code ordered a 200,000-line list in under a second.