Skip to main content
TextReverse

Alphabetize Any List

Paste a list with one item per line, or a single line of items separated by commas, and get it back in alphabetical order. Sort A to Z, Z to A, or A to Z with repeated items removed.

Sorting ignores capital letters and accents, so "apple", "Apple" and "Éclair" land where a reader expects, and numbers sort by value, so "Item 2" comes before "Item 10". Blank lines and stray spaces are cleaned up on the way.

Try an example
Output
Example: “Charlie alpha Bravo delta” becomesalpha Bravo Charlie delta

0 characters · 0 words · 0 lines

Example

Charlie alpha Bravo deltaalpha Bravo Charlie delta

Want the list in reverse order, not sorted? Reverse lines

Alphabetizing Examples

Each output below comes from the same code as the tool. The mode named in each note shows which setting it uses.

InputOutputWhat it shows
Charlie alpha Bravo deltaalpha Bravo Charlie deltaA to Z: capitals do not push words to the top of the list.
pear, fig, apple, bananaapple, banana, fig, pearA single line with commas is sorted as a comma-separated list.
Item 10 Item 2 Item 1Item 1 Item 2 Item 10Numbers sort by value, not digit by digit.
zebra ant monkeyzebra monkey antZ to A: reverse alphabetical order.
red Blue red blue greenBlue green redNo duplicates: each item is kept once, ignoring capitals.
Émile Emma EdgarEdgar Émile EmmaAccents do not move a name to the end of the list.
beta alpha alpha betaBlank lines are dropped and spaces around each item are trimmed.

How the Alphabetizer Sorts

Alphabetical order sounds simple, but a computer sorting by character codes puts "Zebra" before "apple". These are the rules used instead.

Letters first, capitals and accents second

Items are compared as a dictionary would: ignoring capitals and accents. Only when two items are otherwise identical do lowercase, capitals and accents decide the order, so the result is always the same.

Numbers by value

Runs of digits are compared as numbers, so 2 comes before 10 and "Chapter 9" comes before "Chapter 11".

Lines or commas

Each line is one item. If everything is on a single line with commas, the commas separate the items instead, and the sorted list comes back separated by a comma and a space.

Tidy output

Blank lines are removed, spaces around each item are trimmed, and Windows line endings are kept if your list used them.

Sort, Reverse or Shuffle a List?

Three ways to change the order of the same list.

Shared input: banana cherry apple

TransformationResultReach for it when
A to Zapple banana cherryYou want alphabetical order.
Z to Acherry banana appleYou want reverse alphabetical order.
Reverse linesapple cherry bananaYou want the list turned upside down without sorting it.

Lists That Need a Second Look

The tool sorts what you paste, exactly as written. A few kinds of list need a human decision.

"The" and "A" at the start

Titles are sorted by their first word, so "The Hobbit" goes under T. Libraries often move the article to the end first ("Hobbit, The"); do that before pasting if you want that style.

Names by surname

"Ada Lovelace" sorts under A. To sort by surname, write names as "Lovelace, Ada", one per line, so the comma rule does not split them.

Commas inside items on one line

A single line with commas is treated as a comma-separated list. If your items contain commas, put each on its own line instead.

Duplicates that differ slightly

No duplicates ignores capitals and the spaces around an item, but not spelling: "colour" and "color" are both kept.

Alphabetizing Without This Tool

Most office apps can sort too. Pasting here is quicker when the list is not already in a table.

Microsoft Excel

Select a column and use Data > Sort A to Z. Excel sorts cells, so a list in one cell, separated by commas or line breaks, has to be split first.

Google Sheets

Use Data > Sort range, or the formula =SORT(A1:A20). Like Excel, it needs one item per cell.

Microsoft Word

Select the paragraphs and use the Sort button (A to Z with an arrow) on the Home tab. Each paragraph is one item.

Notes and chat apps

Phone notes and chat apps have no sort command. Copy the list here, sort it, and paste it back.

When to Alphabetize a List

Bibliographies and references

Put a works-cited list in order by author before formatting it.

Class and guest lists

Sort names so people can find themselves quickly.

Glossaries and indexes

Order terms for a glossary, index or vocabulary list.

Cleaning up data

Sort and remove duplicates from tags, keywords or email lists.

Frequently Asked Questions

Related Text Tools

Browse all text tools →