Alphabetize List

Paste a list, one item per line or separated by commas, to put it in alphabetical order from A to Z or from Z to A.

One item per line, or one line of items separated by commas. The sorted list appears as you type.
Order
More Options

Results

10 items sorted

Sorted List

10 lines sorted A to Z.

How to Alphabetize a List

  1. Paste your list into Your List, one item per line. A single line of items with commas, such as pear, apple, fig, is sorted and kept as one line with commas.
  2. Pick A to Z or Z to A under Order. The sorted list appears on the right as you type.
  3. Under Sort By, keep The whole line, or pick Last word to sort full names by surname, Length to put the shortest items first, or No sorting to reverse the pasted order.
  4. Leave Numbers in number order and Ignore case on for the order people expect. Turn on Ignore A, An and The at the start for book, film and song titles, and Remove duplicates to keep one copy of each item.
  5. Select Copy List to copy the result. The line under it has the number of items sorted and what was left out.

Example With a Shopping List

The example list has 10 fruits, some with a capital letter. In A to Z order, with capitals ignored, they are Apples, apricots, bananas, blueberries, Cherries, grapes, kiwis, lemons, mangoes, pears. With Z to A picked, the list starts with pears and ends with Apples.

Apples comes before apricots because the third letters are p and r, and the capital A counts the same as a small a. The words bananas and blueberries are sorted by their second letters, a before l.

Sorting Options

SettingList PastedResult
Numbers in number order onphoto10.jpg, photo2.jpg, photo1.jpg, photo20.jpgphoto1.jpg, photo2.jpg, photo10.jpg, photo20.jpg
Numbers in number order offphoto10.jpg, photo2.jpg, photo1.jpg, photo20.jpgphoto1.jpg, photo10.jpg, photo2.jpg, photo20.jpg
Ignore case onapple, Banana, Apple, bananaapple, Apple, Banana, banana
Ignore case offapple, Banana, Apple, bananaApple, apple, Banana, banana
Sort By: Length, shortest firstkiwi, fig, banana, apple, plum, pearfig, kiwi, pear, plum, apple, banana
Sort By: No sorting, reverse the orderfirst, second, third, fourthfourth, third, second, first

With Numbers in number order on, a run of digits is compared as one number, so photo2 comes before photo10. With it off, the digits are compared one at a time, as in a plain text sort, and photo10 comes before photo2 because 1 comes before 2. Leading zeros do not change the number, so item02 and item2 are equal and are left in the order you pasted them.

With Ignore case on, apple and Apple are equal and are left in their pasted order. With it off, they are still sorted by their letters first, and the capital comes first only when the letters are the same: Apple, apple, Banana, banana. With Length, items of the same length are put in alphabetical order.

Alphabetical Order for Titles and Names

In library catalogues, a title is filed under its first word after an article. A MARC 21 record has the number of characters to skip, so The Year book of medicine is filed under Y. With Ignore A, An and The at the start on, six book titles are sorted as Bleak House, The Hobbit, Moby-Dick, A Tale of Two Cities, An Unquiet Mind, The Wind in the Willows. With the switch off, both titles that start with A come first: A Tale of Two Cities, An Unquiet Mind, Bleak House, Moby-Dick, The Hobbit, The Wind in the Willows. Only the English articles A, An and The are skipped, in capitals or small letters, and only when there is a word after them.

With Last word, full names are sorted by the word after the last space, so Ada Lovelace is under L: Charles Babbage, Tim Berners-Lee, Grace Hopper, Katherine Johnson, Ada Lovelace, Alan Turing. For names written surname first, such as Lovelace, Ada, pick The whole line. A surname with a particle, such as de la Cruz, is sorted under its last word, Cruz, and a suffix such as Jr. counts as the last word, so order those names yourself or write them surname first.

Comma Separated Lists

When the list is one line with commas in it, the items between the commas are sorted and the result is one line again, with a comma and a space between items. With Remove duplicates on, pear, apple, Fig, banana, apple becomes apple, banana, Fig, pear, one apple removed. A single line of names written as Lovelace, Ada would be read as two items, so pick One item per line under More Options for a list like that. To change a column into a list with quotes or another separator, use the Comma Separator.

Sort Order for Accents and Symbols

Letters are compared without their accents first, so éclair is sorted with the words that start with e, before Eclipse. Spaces and punctuation come before digits, and digits come before letters: the items apple, _draft, 2 pears, #tag, Zebra and 10 figs are sorted as _draft, #tag, 2 pears, 10 figs, apple, Zebra.

The order is the same for every language, the default order of the Unicode Collation Algorithm, and is not the order of any one alphabet. In Swedish, Norwegian and Danish, Å is after Z, but in this sort it is an A with a ring: Ålesund, Athens, éclair, Eclipse, Oslo, Zurich. Check the result against the rules of the language when the list is not in English.

How to Alphabetize in Microsoft Word

In Word, select the list, then on the Home tab select Sort, the button with A, Z and an arrow. In Sort Text, pick Paragraphs and Text, then Ascending for A to Z or Descending for Z to A. Word has no option for surnames, articles or a comma separated list.

How the List Is Sorted

The list is read line by line, at a line feed, a carriage return, the two together, the next line character (U+0085), the line separator (U+2028) or the paragraph separator (U+2029). It is read as comma separated when it has one line that is not blank and that line has a comma in it, or when Items separated by commas is picked. Spaces at the ends of each item are removed and empty items are left out. With Remove duplicates on, the first copy of each item is kept; items match when their text is the same in Unicode NFC form, with capitals ignored while Ignore case is on.

Items are compared with the browser’s Intl.Collator, set to the locale en, with the Unicode CLDR root order, and numeric order on or off to match the switch. With Ignore case on, the strength is accent (letters first, then accents, capitals ignored); with it off, the strength is variant and capitals come first (upper case first). With Last word, items with the same last word are compared as whole lines, and the same is done for items that are equal after an article is skipped. Items that are still equal are left in the order you pasted them in. Length counts Unicode code points after NFC. The list is sorted in your browser and is not sent anywhere.

FAQs

Q1. How Do I Alphabetize a List?

To alphabetize a list, paste it into the box with one item per line and keep A to Z picked. The list is sorted as you paste, so the 10 fruits in the default list come back from Apples to pears. Select Copy List to copy the sorted list.

Q2. Why Does 10 Come Before 2 When I Sort a List?

10 comes before 2 in a plain text sort because numbers are compared one digit at a time, and the digit 1 comes before 2. With Numbers in number order on, which it is by default, a run of digits is read as one number and photo2 sorts before photo10.

Q3. How Do I Alphabetize a List by Last Name?

To alphabetize a list by last name, pick Last word, for surnames under Sort By. Each full name is filed under the word after its last space, so Charles Babbage comes before Ada Lovelace, and names with the same surname are sorted by the whole name.

Q4. Do You Ignore The When Alphabetizing Titles?

Libraries ignore The, A and An at the start of a title when alphabetizing, so The Hobbit is filed under H. Turn on Ignore A, An and The at the start to sort titles the same way, while the titles are still written in full in the result.

Q5. Can I Alphabetize a Comma Separated List?

Yes, you can alphabetize a comma separated list by pasting it on one line with commas between the items, and the sorted list comes back on one line with commas. pear, apple, Fig, banana becomes apple, banana, Fig, pear, and spaces after the commas do not change the order.

Q6. Does Capitalization Change Alphabetical Order?

Capitalization does not change the order while Ignore case is on: apple and Apple count as the same word. With Ignore case off, words are still sorted by their letters, and a capital comes before a small letter only when the words are otherwise the same.

Sources

Unicode Technical Standard #10, Unicode Collation Algorithm, and the Unicode CLDR root collation (allkeys_CLDR.txt, UCA 18.0.0), for the order. ECMA-402, ECMAScript Internationalization API, for Intl.Collator and its numeric, sensitivity and caseFirst options. Library of Congress, MARC 21 Format for Bibliographic Data, field 245, second indicator (nonfiling characters). Microsoft Support, Sort a list alphabetically in Word.