Alphabetize a List

Sort a list alphabetically, by last name or by length, or reverse it.

The alphabetize a list

Paste a list with one item per line and choose A to Z, Z to A, shortest first, longest first or reverse order. Alphabetical sorting ignores capitals and reads numbers by value, so item 2 comes before item 10. Options file The Beatles under B by ignoring a leading the, a or an, sort people by last name, match case and drop empty lines.

About alphabetizing a list

The WordBench list alphabetizer puts a list of lines in order: alphabetically from A to Z or Z to A, by length from shortest to longest or the other way round, or simply reversed. Paste the list, pick an order, and copy the sorted result. A line under the result says what was done, for example Sorted 9 lines A to Z by last name, articles ignored.

Alphabetizing by hand is tedious and easy to get wrong once a list grows. The sorter uses natural, locale-aware comparison, so numbers inside the text sort the way a person expects, with item 2 landing before item 10 rather than after it, and capitals and accents do not push a line out of place.

Four options cover the cases a plain sort gets wrong. Ignore articles files a line as if a leading the, a or an were not there, the way a record shop files The Beatles under B. Sort by last name orders people by their surname, so Jane Doe comes before Alex Smith. Case sensitive puts Apple before apple when two lines differ only by case. Remove empty lines drops blank lines before sorting. The order and the options are kept in the page link; the list itself never is.

How do you alphabetize a list by last name?

Paste one name per line, choose A to Z and tick Sort by last name. Each line is compared on its last word first and on the words before it second, so Jane Doe files under D and Mary Ann Lee under L, while the names themselves come out exactly as you typed them.

Punctuation around the last word is ignored, so a trailing comma does not change where a line lands. A line with a single word is sorted on that word. If your list is written surname first, as in Doe, Jane, leave the option off: an ordinary A to Z sort already files it under D.

Who uses it

Writers and editorsAlphabetize a glossary, a bibliography, or an index without leaving the browser.
Teachers and organizersPut a class list or a guest list in order by last name without retyping a single name.
DevelopersOrder a list of keys, imports, or config entries into a predictable sequence.
Data teamsSort a column of values to spot gaps, group duplicates, or prepare a clean export.

Worked example

Try it with fictional text

Paste nine lines: The Umbrella Company, Jane Doe, Globex, item 10, The Initech Group, Acme Robotics, John Roe, item 2 and Alex Smith.

A to Z returns Acme Robotics, Alex Smith, Globex, item 2, item 10, Jane Doe, John Roe, The Initech Group, The Umbrella Company. Item 2 comes before item 10 because numbers are read by value, and both The lines sit under T.

Tick Ignore articles and the two The lines move to I and U: Acme Robotics, Alex Smith, Globex, The Initech Group, item 2, item 10, Jane Doe, John Roe, The Umbrella Company. Each line is still printed with its The.

Frequently asked questions

How do I alphabetize a list? Paste the list with one item per line and choose A to Z, or Z to A for reverse alphabetical order. The sorted list appears at once and Copy puts it on your clipboard. Capitals and accents do not change the order, and numbers inside a line are read by value.

How do I alphabetize a list?

Paste the list with one item per line and choose A to Z, or Z to A for reverse alphabetical order. The sorted list appears at once and Copy puts it on your clipboard. Capitals and accents do not change the order, and numbers inside a line are read by value.

What does ignore articles do?

It compares each line as if a leading the, a or an were not there, so The Beatles is filed under B and A Globex Report under G. The line is still printed exactly as you typed it. An article is only skipped when another word follows it, so a line that is just The stays under T.

Can it sort names by last name?

Yes. Tick Sort by last name and each line is compared on its last word first, then on the words before it, so Jane Doe comes before Alex Smith and two people called Doe are ordered by first name. Punctuation around the last word, such as a trailing comma, is ignored.

Why does item 10 come after item 2?

Because the sort is natural, or number-aware: a run of digits is compared by its value, not character by character. A plain character sort puts item 10 before item 2, because the character 1 comes before 2. Natural order is what people expect from a numbered list, so it is always on.

Is the sort case sensitive?

Not by default. A to Z compares letters without regard to case, so acme and Acme are ordered by their letters, and two lines that differ only by case keep their original order. Tick Case sensitive to put the capital first, Apple before apple, while the list as a whole stays alphabetical.

What does sort by length do?

It orders lines by how many characters they contain, shortest first or longest first, which is handy for finding outliers or checking that labels fit a fixed width. Lines of the same length keep their original order.

Does sorting remove duplicates?

No. Sorting only reorders lines, and Remove empty lines only drops blank ones. To also remove repeats, run the list through the remove duplicate lines tool.

Exactly what this tool counts, and why the result can differ from your word processor, is written out on the methodology page. Platform character limits, with the unit each one counts in and the date it was checked, are on the character limits pages.


Related tools