Alphabetical Order Tool

Put a list in alphabetical order from A to Z or Z to A, with one item per line or words separated by spaces and commas. Options cover ignoring case, removing duplicates and sorting numbers naturally. The tool is free and runs in your browser, so your list is never uploaded.

Alphabetical Order ToolPrivate · runs on your device
Input
Words 0Characters 0Lines 0
Sorted list

Example: pear apple mango → apple mango pear

How to put words in alphabetical order

Alphabetising by hand gets slow once a list passes a dozen entries. The tool sorts as soon as you paste.

  1. Paste your list into the Input box.
  2. Set Items are to One per line or Separated by spaces or commas, so the tool knows where each entry ends.
  3. Choose the Order: A to Z or Z to A.
  4. Adjust the three tick boxes: Ignore case (on by default), Remove duplicates (off) and Natural number order (on).
  5. Read the result in the Sorted list box, then press Copy or Download .txt.

For example, the lines pear, apple and mango come out as apple, mango, pear.

The second setting matters when your list is a single line. Pasting pear, apple; mango banana with Items are set to the spaces or commas option and the order set to Z to A returns pear, mango, banana, apple, one per line. With One per line selected instead, the whole line would be treated as a single item and nothing would appear to sort. If a sort looks as though it did nothing, check this setting first.

How the sorting rules work

The tool compares text with your browser's language-aware collation, not raw character codes. That avoids the classic surprise in which every capital letter sorts before every lowercase one.

  • Ignore case on. Capital and lowercase letters count as equal, and accents are ignored when comparing too. Entries that compare as equal, such as Eclair and Éclair, stay in the order you entered them.
  • Ignore case off. Case and accents now break ties, with lowercase before uppercase. apple comes before Apple, and Zebra still follows banana.
  • Natural number order. Digits are read as numbers, so item1, item2, item10 come out in that order instead of item1, item10, item2.
  • Remove duplicates. The first copy is kept. With Ignore case on, Apple, apple and APPLE collapse to Apple.
  • Z to A. This simply reverses the A to Z result.

As a worked case, the list banana, Apple, cherry, Zebra, apple gives Apple, apple, banana, cherry, Zebra with the defaults, and apple, Apple, banana, cherry, Zebra with Ignore case off. The order of accented and special letters follows your browser language, so a reader whose browser is set to Swedish may see å, ä and ö placed after z, as that language expects, while an English setting places them beside a and o.

Natural number order only concerns digits inside text. It does not understand minus signs or decimal points, so -5 and 2.5 are compared as pieces of text. It also treats each run of digits separately, which is why a list such as chapter 1.10 and chapter 1.9 sorts the 9 before the 10. For genuine decimal sorting, switch to the number sorter.

Splitting, cleaning and common jobs

When Items are is set to spaces or commas, the tool splits at spaces, commas and semicolons. Either way the output is one item per line, so a comma-separated list comes back as a column. To rebuild a comma list, use the find and replace tool with Regular expression on, finding \n and replacing with a comma and a space. Blank lines and spaces around entries are dropped.

  • Sorting by surname. Write each name as Last, First with One per line selected. The words setting would split the name at the comma.
  • Articles and prefixes. The tool compares from the first character, so The Hobbit sorts under T, and bullets or numbering count as characters.
  • Teachers and students. Spelling lists, vocabulary, glossaries and reference lists are quick to arrange.
  • Admin and developers. Tags, file names, configuration keys and imports.

Negative signs and decimal points are not treated as numbers here. For a list of pure numbers, use the number sorter. To remove repeated entries without sorting, use the duplicate line remover, and to flip a finished list use the reverse text generator.

Quick answers

Frequently asked questions

The questions people ask most, answered in plain words.

How do I put a list in alphabetical order online?

Paste the list into the Input box, choose whether the items are one per line or separated by spaces and commas, and pick A to Z. The sorted list appears at once in the output box, ready to copy or download as a text file.

Does the tool sort names by surname?

It sorts each entry from its first character, so First Last names are ordered by first name. To sort by surname, write each name as Last, First on its own line, keep Items are on One per line, and the list sorts by surname.

Why do capital letters sometimes sort before lowercase ones?

In raw character order, every capital comes before every lowercase letter. This tool uses language-aware sorting instead, so Zebra follows banana even with Ignore case off. With Ignore case on, capitals and lowercase letters count as equal.

What is natural number order?

Natural order reads runs of digits as whole numbers, so file2 comes before file10 and file100, matching how people count. With it off, file10 sorts before file2 because the character 1 is less than 2. It is on by default.

Can I alphabetise words separated by commas?

Yes. Set Items are to Separated by spaces or commas. The tool splits the text at spaces, commas and semicolons, sorts the words, and returns them one per line. Join them back into a row afterwards with the find and replace tool if you need a comma list.