List Sorter guide
Sort names, keywords, URLs, SKUs, or copied spreadsheet rows. Natural ordering puts item2 before item10, numeric mode sorts prices and scores correctly, and shuffle gives a fair random order.
Why sorting text is harder than it looks
Computers sort text by character codes unless told otherwise. In that scheme every uppercase letter comes before every lowercase letter, so Zebra lands ahead of apple, and digits are compared one at a time, so file10 lands ahead of file2. Both results are technically correct and practically useless.
This sorter uses the browser's Intl.Collator with US English rules, the same machinery that powers locale-aware sorting in modern apps. It treats Apple and apple as neighbors, orders accented letters where a reader expects them (é next to e), and with natural order on, compares runs of digits as whole numbers.
What each mode does
A to Z and Z to A: alphabetical using the collator. Natural order controls whether numbers inside text are read as numbers. Case-sensitive switches to uppercase-first ordering, useful when capitalization carries meaning, like constants in code.
Numeric: pulls the first number out of each line, ignoring dollar signs and thousands commas, and sorts by its value. $1,200, $95, and $450 become $95, $450, $1,200. Lines with no number go to the bottom, and ties fall back to alphabetical order so the output is stable.
Length: shortest or longest line first, useful for spotting outliers such as a truncated URL or an overlong product title. Reverse flips the current order without sorting. Shuffle produces a random order.
Worked example
Input: banana, Apple, item10, cherry, item2, apple, Date, item1. A plain character-code sort gives Apple, Date, apple, banana, cherry, item1, item10, item2: capitals first, and item10 before item2.
This tool, with default settings, gives Apple, apple, banana, cherry, Date, item1, item2, item10. Tick Remove duplicates and the second apple disappears, because duplicate matching ignores case unless Case-sensitive is on. The counter confirms it: 7 items, 1 duplicate removed.
How the shuffle works
A common way to shuffle in JavaScript is list.sort(() => Math.random() - 0.5). It looks random but is not: some orders come up far more often than others, and the bias depends on the browser. This tool uses the Fisher-Yates shuffle instead. It walks the list from the end, swapping each item with a randomly chosen item at or before it. Every one of the n! possible orders is equally likely.
The random numbers come from crypto.getRandomValues, the browser's cryptographically secure generator. That is overkill for shuffling a playlist, but it means you can use the result for raffles, presentation order, or assigning teams without anyone questioning fairness.
Practical uses
Clean up keyword lists: paste, trim, remove duplicates, sort A to Z, and you have a tidy list for a spreadsheet. Merge two exported email lists, dedupe them in one pass, and see exactly how many overlapped from the counter. Sort price or score lists pasted from an email. Alphabetize bibliography entries, guest lists, or glossary terms. Randomize quiz question order or speaking order for a meeting. Find the longest titles in a product feed before they get truncated in search results.
Common mistakes
Sorting names by first name when you meant last name: the sorter compares whole lines from the first character, so put last names first (Smith, Jane) if that is the order you need. Leaving trailing spaces: two lines that look identical but differ by a space will not deduplicate unless Trim is on, which it is by default. And forgetting that numeric mode uses only the first number in a line, so Order 12 of 40 sorts by 12.
Numeric sorting in detail
Numeric mode reads the first number it finds in each line, including negatives and decimals, after removing dollar signs and thousands commas. So Order #1,200 sorts as 1200, -3.5 degrees sorts as -3.5, and Widget sorts to the bottom because it has no number. Ties are broken alphabetically, which keeps the output stable and predictable when you re-run it.
For lists that mix text and numbers, such as Chapter 2, Chapter 10, Appendix, natural A to Z order is often a better fit than numeric mode, since it respects both the words and the numbers.
How we calculate: sources
Frequently asked questions
How do I sort a list alphabetically?
Paste one item per line and choose A to Z. The list is sorted instantly using US English collation, so Apple and apple sit together instead of all capitals coming first.
Why does item10 come before item2 in other sorters?
Plain text sorting compares character by character, and the character 1 comes before 2. Natural order, on by default here, reads digit runs as numbers, so item1, item2, item10 come out in the order a person expects.
How do I sort numbers from smallest to largest?
Choose Numeric. The first number in each line is used, dollar signs and thousands commas are ignored, so $1,200, $95, and $450 sort as 95, 450, 1,200. Lines without a number go to the end.
Can it remove duplicates while sorting?
Yes. Tick Remove duplicates. Matching ignores case unless Case-sensitive is on, and the count shows how many duplicates were removed.
Is the shuffle truly random?
It uses the Fisher-Yates algorithm with your browser's cryptographic random number generator, so every possible order is equally likely. Use Shuffle again for a new order.
How do I sort a list in Excel or Google Sheets instead?
Select the column and use Data > Sort range (Sheets) or Data > Sort A to Z (Excel). For a quick one-off list, pasting here is faster, and it handles natural number order, which spreadsheets do not do for mixed text.
Is my list uploaded?
Everything runs in your browser. Nothing you enter is uploaded to a server or stored by us.
Does it sort a comma-separated list?
It sorts one item per line. Replace commas with line breaks first; in most editors you can find , and replace it with a newline, then paste the result here.
How are accented letters sorted?
With US English collation, accented letters sort next to their base letter, so éclair sits with the e words rather than after z, which is where a raw character-code sort would put it.