How to put a list in alphabetical order
- Paste your list into the box — names, words, book titles, countries, product codes, anything. Put one item on each line, or separate the items with commas.
- Choose the order: A to Z, Z to A, or Reverse list, which simply turns the current order upside down without sorting.
- Tell the tool how the items are separated: one per line, comma-separated, or Words to sort every word of a sentence or paragraph.
- Pick the options you need (below) and press Copy beside the sorted list. The result updates as you type, and the counts show how many items, duplicates and empty lines there were.
What each option does
| Option | Example | Result |
|---|---|---|
| Sort by last word (surnames) | Mary Smith, John Adams, Anna Brown | John Adams, Anna Brown, Mary Smith |
| Ignore “The”, “A”, “An” | The Who, Abba, The Beatles | Abba, The Beatles, The Who |
| Natural number order | Chapter 10, Chapter 2, Chapter 1 | Chapter 1, Chapter 2, Chapter 10 |
| Ignore uppercase and lowercase | banana, Apple, cherry | Apple, banana, cherry |
| Remove duplicates | apple, Apple, pear, apple | apple, pear |
| Remove empty lines, trim spaces | blank lines and stray spaces from a pasted column | a clean list with no gaps |
With Ignore uppercase and lowercase turned off, items that differ only in capitals are kept apart and the capitalized one comes first (Apple before apple); duplicates then have to match exactly.
How alphabetical order works
Items are compared letter by letter from the left: the first letter decides, and only when it is the same does the second one count, and so on. A shorter item that matches the start of a longer one comes first, so art goes before artist. Spaces and punctuation are compared too, which is why New York comes before Newark.
Numbers are where many sorters go wrong. Compared character by character, “10” starts with a 1 and lands before “2” — that is how a computer lists the files photo1, photo10, photo2. Natural number order reads each run of digits as a whole number instead, so photo2 comes before photo10, the way a person would arrange them. Turn the option off when the digits are codes rather than quantities.
Accents and letters beyond A–Z follow the real rules of each language, not the order of character codes. A simple program that sorts by code would put Émile after Zoe because É has a higher number than Z; this tool uses the Unicode Collation Algorithm built into your browser, so Émile sits with the other E names. The same page in other languages sorts by that language’s alphabet — Spanish places ñ after n, for example.
Worked example: a class list by surname
Paste the names as they arrived — Mary Smith, john adams, Anna Brown, Luis García, Mary Smith, one per line. Turn on Sort by last word and Remove duplicates. The result is john adams, Anna Brown, Luis García, Mary Smith: four names, one duplicate removed, ordered by Adams, Brown, García, Smith even though the first names start with other letters and one is lowercase. To change the capitals afterwards, run the list through the case converter.
Tips
- Titles of books, films and bands: libraries file The Great Gatsby under G. Turn on Ignore “The”, “A”, “An” to do the same; the titles keep their article in the result.
- A column from Excel or Google Sheets pastes as one item per line. Paste the sorted list back into the first cell and it fills the column again.
- Words of a paragraph: choose Words to sort every word; punctuation is left out, so “dog,” and “dog” are the same word. Combine it with Remove duplicates to get a vocabulary list.
- To compare two versions of a list after sorting them, use the diff checker; to count the items or words, the word counter.
Frequently asked questions
How do I sort a list alphabetically?
Paste the list with one item per line (or separated by commas), choose A to Z and copy the result. It updates as you type, and you can sort Z to A or reverse the list with one tap.
Can I sort names by last name?
Yes. Turn on “Sort by last word (surnames)”: each line is ordered by its last word, so Mary Smith comes after Anna Brown, while the full names stay as you typed them.
Why does item 10 come before item 2 in some sorters?
Because they compare characters, and “1” comes before “2”. With natural number order (on by default) whole numbers are compared, so item 2 comes before item 10.
Does it handle accents and other alphabets?
Yes. Sorting follows the Unicode Collation Algorithm in your browser: é is sorted with e, and the localized versions of this page follow their own alphabet, such as ñ after n in Spanish.
Is my list uploaded or saved?
No. The list is sorted by your own browser and is not sent anywhere or kept after you close the page.
Last updated: October 19, 2026