Alphabetical order sorter

Sort any list of lines into alphabetical, numeric or random order.

Runs in your browser. Nothing you type is sent anywhere.

How to put a list in alphabetical order

  1. Paste your list with one item per line.
  2. Pick an order: A to Z, Z to A, natural number order, length, shuffle or reverse.
  3. Copy the sorted list or download it as a text file.

Natural order vs plain alphabetical order

InputPlain A to ZNatural order
item 1, item 2, item 10item 1, item 10, item 2item 1, item 2, item 10

Plain alphabetical order compares text character by character, so a leading 1 sorts before a 2 no matter what comes after it, putting item 10 ahead of item 2. Natural order reads the digits as a number first, so item 2 correctly comes before item 10.

How shuffle works

Shuffle uses the Fisher-Yates algorithm, a standard method for producing a genuinely random order where every possible arrangement of the list is equally likely. It's the same basic technique used to shuffle a deck of cards fairly in software.

Alphabetical order FAQ

What is natural order sorting?

Natural order reads numbers inside text as numbers, so "item 2" sorts before "item 10". A plain alphabetical sort would put "item 10" first because "1" comes before "2" character by character.

Can I sort a list from Z to A?

Yes, choose the Z to A option and the same list sorts in reverse alphabetical order.

What does shuffle do?

Shuffle puts the lines in a random order each time, which is useful for randomizing a list of names, prizes or quiz questions.

Is sorting case sensitive?

Case insensitive sorting is on by default, so "apple" and "Apple" sort next to each other. Turn it off to sort capital letters strictly before lower case ones.

Can I sort a list by how long each line is?

Yes, choose the by length option to sort from shortest to longest line, which is useful for arranging tags or names by size before laying them out in columns.

What happens to blank lines when sorting?

A trailing blank line at the very end of the pasted text is ignored, but a blank line in the middle of the list is treated as an empty line and sorted along with everything else.

Can I remove duplicates while sorting at the same time?

Yes, turn on the remove duplicate lines option alongside any sort order, so the result comes out both deduplicated and sorted in a single pass.

Related tools