Numbers in natural order
- Input
item 10 item 2 item 1
- Expected result
item 1 item 2 item 10
Press Sort. Natural number order is enabled: 2 comes before 10.
YOUR TEXT TOOLBOX
Sort any list of words or phrases instantly, online and free
Your text never leaves your device. How we protect your privacy (in Spanish) ↗
02 / Try an example
Load an example, apply the named operation and compare the result. Changes stay in this tab. If you have already written text, we ask before replacing it.
item 10 item 2 item 1
item 1 item 2 item 10
Press Sort. Natural number order is enabled: 2 comes before 10.
Bea ANA Ana Carlos
ANA Bea Carlos
Press Sort. Case is ignored and the first version of Ana is kept.
banana fig kiwi
fig kiwi banana
Press Sort. Length counts characters, not visual width.
With this tool you can sort any list of words, names, phrases or items instantly. Paste your list with one item per line, choose how to sort it and press the button. The result appears in the same box, ready to copy.
Sorting is done the way people expect, not by raw character codes: “Álvarez” goes next to “Alonso”, not after “Zúñiga”, upper and lower case are treated alike, and if the list has numbers (“item 2”, “item 10”) you can turn on natural order so that 2 comes before 10.
| Mode | What it does | When to use it |
|---|---|---|
| A → Z | Ascending alphabetical order | Lists of names, indexes, glossaries |
| Z → A | Descending alphabetical order | See the end of the alphabet first, reverse an earlier order |
| By length | From the shortest line to the longest | Menus, labels and lists where visual length matters |
| Random | Shuffles the lines | Draws, speaking turns, question order |
A naive program sorts by character codes, and accents break it: “Éric” would end up after “Zoe”, because É has a higher code than Z. This tool compares text with the alphabetical rules of the language, so accented letters sit next to their plain versions.
The “Ignore case when sorting” box avoids the other classic problem: “zebra” and “Zebra” ending up far apart because of the case of the first letter. And the remove duplicates and remove empty lines boxes tidy the list in the same pass, with no extra tools.
| Input | Mode | Result |
|---|---|---|
| pear, Apple, banana, apple | A → Z, ignore case | Apple, apple, banana, pear |
| item 10, item 2, item 1 | A → Z + natural order | item 1, item 2, item 10 |
| kiwi, fig, banana | By length | fig, kiwi, banana |
| Ana, Bea, Ana | A → Z + remove duplicates | Ana, Bea |
Each line is one item, so a list separated by commas needs its commas turned into line breaks first (use Find and Replace with a regular expression). “By length” counts characters, including spaces. Undo last change restores one step during this visit, until you edit the result. Keep the original for a complete history. Sorting follows the alphabetical rules of English; for languages with letters that sort in special places, such as ñ in Spanish or å in Swedish, use the page for that language.
Paste your list in the box, one item per line. Select A → Z and press Sort. All lines are put in alphabetical order at once, with accented letters in their right place.
The first one in the original list is kept, and then the list is sorted. If “JOHN SMITH” comes before “John Smith” and “Ignore case” is on, the capitalised version survives. To keep the other one, unify the case first.
With “Ignore case” on (the default), “avila”, “Avila” and “Ávila” count as equivalent when sorting. If you turn it off, the order is still alphabetical, and case only decides between lines that are otherwise equal.
Yes. Each line is treated as one item, however many words it has. You can sort full sentences, titles, names with surnames or any text, as long as every item is on its own line.
Items are sorted from shortest to longest by the number of characters in each line. It helps to spot the most concise entries or to find very long ones that may need shortening.
With “Ignore case” on, “Apple” and “apple” are duplicates and one is removed when “Remove duplicates” is on too. With it off, they are different items and both are kept.
Undo last change restores one step during this visit, until you edit the result. Keep the original for a complete history.
Because alphabetical order compares character by character, and “10” starts with “1”. Tick “Natural number order” and the digits are compared as whole numbers: item 1, item 2, item 10.
It sorts any text, always with the rules of the page language. For most lists in Spanish, Catalan, French or German the result is what you expect. For languages with their own letters at special places in the alphabet, results can differ from a dictionary.