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.
Example
Charlie alpha Bravo deltaalpha Bravo Charlie deltaWant 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.
| Input | Output | What it shows |
|---|---|---|
| Charlie alpha Bravo delta | alpha Bravo Charlie delta | A to Z: capitals do not push words to the top of the list. |
| pear, fig, apple, banana | apple, banana, fig, pear | A single line with commas is sorted as a comma-separated list. |
| Item 10 Item 2 Item 1 | Item 1 Item 2 Item 10 | Numbers sort by value, not digit by digit. |
| zebra ant monkey | zebra monkey ant | Z to A: reverse alphabetical order. |
| red Blue red blue green | Blue green red | No duplicates: each item is kept once, ignoring capitals. |
| Émile Emma Edgar | Edgar Émile Emma | Accents do not move a name to the end of the list. |
| beta alpha | alpha beta | Blank 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
| Transformation | Result | Reach for it when |
|---|---|---|
| A to Z | apple banana cherry | You want alphabetical order. |
| Z to A | cherry banana apple | You want reverse alphabetical order. |
| Reverse lines | apple cherry banana | You 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
Paste the list with one item per line, or on one line separated by commas. It is sorted A to Z straight away; choose Z to A or No duplicates above the result if you need them, then copy the list.
No. Capitals are ignored when sorting, so "apple" and "Banana" are in normal dictionary order. Only identical words with different capitals are ordered by case, lowercase first.
By value. "File 2" comes before "File 10", and a line that starts with a number comes before lines that start with letters.
Yes. Choose Z to A above the result.
Yes. Choose A to Z, no duplicates. Items that differ only in capitals or surrounding spaces count as the same item, and the first one is kept.
No. Sorting happens in your browser and the list is not sent to a server.
Related Text Tools
Line Break Remover
Join hard-wrapped lines from PDFs and emails into clean text.
Text Repeater
Repeat a word or message up to 100,000 times, one per line or joined.
Invisible Character
Copy blank text and invisible characters, or find hidden ones in pasted text.
Character Map
Every Unicode substitute used by the flip and mirror tools, with code points.
Backwards Text Generator
Turn any sentence into backwards text, character by character.
Upside Down Text Generator
Turn text upside down, flipped in-place, backwards or mirrored with instant copy.
Flip Text Generator
Flip text 180° with rotated Unicode lookalikes.
Case Converter
Switch between six letter cases from a single input box.