Skip to content

Alphabetize a list

Paste a list of names, words or titles and sort it into alphabetical order, A to Z or Z to A, cleaning up spaces, blank lines and duplicates along the way.

  • Free, no limits
  • No sign-up
Everything happens in your browser; your data is never uploaded.
  • ✓ Free
  • ✓ No sign-up
  • ✓ Nothing uploaded

Next step

What to do next

How to use it

  1. Paste your list, one item per line.
  2. Choose A–Z or Z–A.
  3. Keep or change the cleanup options.
  4. Click Sort and copy or download the list.
Try it now

How the alphabetizer sorts

Items are compared in dictionary order:

  • Case doesn't matter. apple, Apple and APPLE sort together.
  • Accents don't matter. Éclair sorts with the E's, next to eclair.
  • Numbers sort by value. Chapter 2 comes before Chapter 10, not after it, which is what people expect (simple computer sorting would put 10 first because 1 comes before 2).
  • Digits come before letters. 3 Musketeers sorts before Apple.

Choose Z–A to reverse the order.

Cleanup options

Three checkboxes run before sorting:

  • Remove extra spaces. Trims spaces at the start and end of each line and collapses double spaces inside it, so ␣␣John␣␣Smith sorts as John Smith. On by default.
  • Skip empty lines. Blank lines are removed instead of collecting at the top. On by default.
  • Remove duplicate lines. Keeps each item once. Off by default; turn it on for guest lists or keyword lists where an item may appear twice. Duplicates must match exactly, including capitalization.

The message next to the button tells you how many lines were sorted.

Alphabetical order rules in brief

There are two traditional ways to alphabetize entries that contain spaces:

MethodOrder
Word by wordNew Jersey, New York, Newark
Letter by letterNew Jersey, Newark, New York

Word-by-word order treats a space as coming before any letter; letter-by-letter order ignores spaces. Many dictionaries use letter by letter, while many indexes and library catalogs use word by word. This tool sorts word by word, which is the more common choice for everyday lists. If your publisher or teacher specifies letter-by-letter order, check entries that contain spaces, hyphens or apostrophes.

Another frequent question is where numbers go. Here, entries that start with a digit come first, in numeric order. Some style guides instead file numbers as if spelled out (3 Musketeers under T for Three); rename those entries before sorting if you need that.

Sorting names

Names sort by whatever comes first on the line. To sort people by last name, the last name must come first:

As typedSorted by
Anna Smithfirst name (Anna)
Smith, Annalast name (Smith)

If your list is First Last, you can flip it with find and replace: turn on regular expressions, find (\S+) (\S+) and replace with $2, $1. Check names with middle names or suffixes like Jr. by hand.

Library-style rules, such as ignoring a leading The in titles (The Great Gatsby under G) or sorting Mc as Mac, are not applied automatically. Move or remove those words before sorting if your style requires it.

More sorting options

This tool is the quick A–Z option. For more control, the sort lines tool can also sort numerically, by line length, in reverse order or randomly.

Typical uses for alphabetical order:

  • Guest lists, class rosters and team lists.
  • Bibliographies and reference lists (check your style guide for the exact rules).
  • Glossaries, indexes and vocabulary lists.
  • Product names, tags and categories for menus and dropdowns.
  • Spelling bee and word game lists.

Copy a column from a spreadsheet, alphabetize it here, and paste it back. Sorting runs in your browser; your list is never uploaded.

Frequently asked questions

How do I put a list in alphabetical order?

Paste the list with one item per line, choose A–Z and click Sort.

Does it sort uppercase and lowercase separately?

No. Capitalization is ignored, so Apple and apple sort together.

How are numbers sorted?

By value: 2 comes before 10. Items starting with digits come before items starting with letters.

How do I sort names by last name?

Put the last name first on each line (Smith, Anna) and then sort.

Can I remove duplicates while sorting?

Yes. Turn on “Remove duplicate lines”.

Last updated: November 12, 2026

Recommended

Similar tools

If Alphabetical order helped, you may need these too.

See all in category →

People also use