Alphabetizer
Paste a list, one item per line, and sort it A to Z, Z to A, or in natural order with numbers.
Put one item per line. Empty lines get sorted too and land at the top in A to Z, so delete them first if you don't want them. It all runs in your browser: your text is never uploaded.
Example input and result
Zebra apple éclair Banana cherry
Result
apple Banana cherry éclair Zebra
How to put a list in alphabetical order
Paste your list into “Your text” with one item per line, and the sorted list appears in “Result” as you type. Choose the order in “Mode”, and use the two checkboxes under “More options”, “Ignore case” and “Remove duplicates”, to fine-tune it. When the list looks right, “Copy result” copies it and “Download TXT” saves it as a text file.
Try “Zebra”, “apple”, “éclair”, “Banana”, and “cherry” on five lines. “A to Z” returns apple, Banana, cherry, éclair, Zebra: capitals don't jump to the top, and “éclair” files under e, as it would in a dictionary. A basic sort by character code would put Banana and Zebra first and send éclair to the end.
Natural order for lists with numbers
A plain alphabetical sort reads digits one at a time, so “chapter 10” lands before “chapter 2”, and “100” before “9”. “Natural order (2 before 10)” reads each run of digits as a whole number, which puts numbered items where you expect them.
“Z to A” reverses the plain alphabetical order, and it can't be combined with natural order, since both live in the same “Mode” menu. In Z to A, “chapter 10” still sits between “chapter 2” and “chapter 1”. For a numbered list from highest to lowest, sort it in natural order and then reverse the lines yourself. Compare the two modes on the same four lines:
- A to Z: chapter 1, chapter 10, chapter 2, chapter 21
- Natural order: chapter 1, chapter 2, chapter 10, chapter 21
- Z to A: chapter 21, chapter 2, chapter 10, chapter 1
Capital letters, accents, and duplicates
Without “Ignore case”, words that differ only in capitals sort lowercase first: lima, Lima, LIMA. With it on, capitals and accents stop deciding the order, so those words keep the order you typed them in. “Remove duplicates” deletes exact copies; turn on “Ignore case” as well and “apple” and “Apple” merge into one, keeping whichever appears first in your list.
Accents follow dictionary rules: an accented letter sorts with its plain letter and only breaks ties, so “éclair” sits among the e words, not after z. On this English page, ñ counts as a form of n, so “ñame” sorts before “naranja”. The Spanish version of the page uses Spanish rules and puts ñ after n, as Spanish dictionaries do.
Things that change where a line lands
The sorter compares whole lines from the first character, which matters when a line starts with something other than a letter. Spaces, symbols, and digits all count, and they all sort before the letters. If an item ends up in an odd spot, check what comes before its first letter, starting with these cases:
- Empty lines sort first in A to Z and last in Z to A, and “Remove duplicates” shrinks several of them to one
- A line that starts with a space sorts before every word
- Symbols and quotes come before digits and letters, so “#todo” sorts ahead of “2 lemons”, which sorts ahead of “apple”
- Names sort by the first word on the line, so write “Smith, Anna” to sort by last name
- A comma-separated list sits on one line and won't sort, so put each item on its own line first
Frequently asked questions
How do I alphabetize a list?
Paste the list with one item per line, keep “A to Z” in “Mode”, and copy the result. If your items are separated by commas, put each one on its own line first, because the alphabetizer sorts whole lines, not words inside a line.
How do I sort names by last name?
Write each name as “Last, First”, like “Garcia, Ana”, one per line, and sort A to Z. The alphabetizer compares lines from the first letter, so whichever word comes first decides the order. Names written “Ana Garcia” would sort by first name.
Why does 10 come before 2?
A plain alphabetical sort compares numbers digit by digit, and 1 comes before 2. Choose “Natural order (2 before 10)” in “Mode” and runs of digits are read as whole numbers, so chapter 2 lands before chapter 10 and 9 before 100.
What does Ignore case do?
It treats capital and lowercase letters as the same when comparing lines, so “Lima” and “lima” count as equal and stay in the order you typed them. With “Remove duplicates” on as well, they merge into one line. Accents still count when removing duplicates, so “café” and “cafe” both stay.
Where does ñ go in alphabetical order?
In Spanish, ñ is its own letter between n and o, and the Spanish version of this page sorts it that way. This English page uses English rules, which treat ñ as an n with a mark, so “ñame” comes before “naranja”.