How to use the text sorter
- Paste your list into the left box with one item on each line: names, words, file names, numbers, anything.
- Choose how to sort from the menu. The sorted list appears on the right at once and updates as you change the menu or edit the input.
- Press Copy sorted list, or Sorted → input to sort the result again in a different way, for example by length and then alphabetically.
Spaces at the ends of lines and empty lines are removed by default, because they otherwise sort to the top and look like errors. Untick those options if you need every line kept exactly as typed.
The sort methods explained
| Method | How it orders lines | Example result |
|---|---|---|
| Alphabetical | Follows your language's dictionary order, ignoring case and accents by default | Apple, banana, cherry, Date |
| Natural order | Reads runs of digits as numbers, not characters | file1, file2, file10 |
| Number at the start | Uses the number at the beginning of each line; lines without one go last | 2 eggs, 10 apples, 100 g flour |
| Length | Counts characters, shortest or longest first, ties sorted A to Z | Date, apple, banana |
| Reverse | Flips the order the lines are in now | Last line becomes first |
| Shuffle | Random order using the browser's secure random generator | Different each time |
Why plain alphabetical sorting gets numbers wrong
A strict character-by-character sort compares one character at a time, so file10 comes before file2, because the character 1 is smaller than 2. People usually expect file1, file2, file10. Natural order fixes this by reading a whole run of digits as one number. That is the order file managers use, and it is the right choice for version numbers, chapter titles, house numbers and file names.
Capital letters are another trap. In raw computer order (ASCII), every capital letter comes before every lowercase letter, so Zebra sorts before apple. This tool uses your device's language rules, so apple comes before Zebra, which matches a dictionary. Tick Case-sensitive if you want the computer order, with capitals first.
Worked example
Press Try sample to load seven lines: banana, Apple, cherry, file10, file2, file1, Date.
- A to Z: Apple, banana, cherry, Date, file1, file10, file2. The letters are ordered by dictionary rules, and file10 comes before file2 because it is read character by character.
- Natural order: Apple, banana, cherry, Date, file1, file2, file10.
- Length, shortest first: Date (4 characters), then Apple, file1 and file2 (5 each), then banana, cherry and file10 (6 each). Lines of equal length are put in alphabetical order.
- Case-sensitive A to Z: Apple, Date, banana, cherry, file1, file10, file2. Both capitalised words move to the front.
Practical ways to use a sorted list
- Finding duplicates by eye. Once a list is sorted, repeated items sit next to each other. Follow it with the duplicate remover to clean it.
- Alphabetising names, references or glossary terms before pasting them into a document.
- Ordering version numbers and file names with natural sort, so 1.9 comes before 1.10 in lists that use whole numbers.
- Ranking by length to spot very short or very long entries, such as titles that will be cut off in search results.
- Shuffling a roster to pick presentation order, or a question list to avoid always starting with the same one.
Sorting with accents and other languages
Dictionary order is not the same in every language. In English, é sorts with e. In Swedish, ä and ö come after z, and in some traditional Spanish orderings ch was a separate letter. The tool asks your browser to apply the rules for the language your device is set to, so lists in your own language usually sort the way you expect. If you share a sorted list with someone whose device uses another language, the order can differ slightly in edge cases like these.
Urdu, Arabic and other non-Latin scripts sort by their letter order in the Unicode tables, which follows the standard alphabetical order for those scripts in most cases.
Accuracy and limits
Sorting uses your browser's language-aware comparison, so the order of accented letters follows your device's language settings and may differ slightly between devices. Numbers with a currency symbol or a letter before them (such as $5 or v2) are not read as numbers in the number-first mode; use natural order for those. The shuffle is random each time and cannot be repeated.
Frequently asked questions
How do I sort a list alphabetically?
Paste the list, one item per line, and leave “Alphabetical, A to Z” selected. Copy the sorted list from the right-hand box.
How do I sort numbers correctly?
Use “Number at the start” for lines that begin with numbers, or “Natural order” if the numbers are inside names, such as file2 and file10. Plain alphabetical order would put 10 before 2.
Does it ignore uppercase and lowercase?
Yes, by default, so Apple and banana sort as in a dictionary. Tick case-sensitive to put capitals first, as a computer would.
Can I sort by the last word or a column?
This tool sorts whole lines. To sort by another part of a line, move that part to the start first, using find and replace, or use a spreadsheet.
Is the shuffle truly random?
It uses the browser's cryptographic random generator and an unbiased shuffle, so every order is equally likely. It is good for drawing names, but not meant for official lotteries.