Skip to content
MoneyDeck

Alphabetical Order Sorter

Alphabetize any list A–Z or Z–A, by length, naturally or at random

Updated · Free, no signup

Sorted list

Apple
banana
Blueberry
cherry
kiwi
Mango

Items

6

Duplicates removed

0

  • Sorted 6 items.
  • First: "Apple" · Last: "Mango".

About the Alphabetical Order Sorter

This alphabetical order sorter alphabetizes any list in one step. Paste names, keywords, references, tags or spreadsheet cells, choose how the items are separated (one per line, by spaces, or by commas) and pick an order: A to Z, Z to A, shortest to longest, natural order, reversed, or a random shuffle.

Natural order sorts numbers inside text by their value, so "Chapter 2" comes before "Chapter 10" — something plain alphabetical sorting gets wrong. Random order uses a seed, so the same seed always produces the same shuffle, which is handy for fair draws or reproducible test data.

Sorting ignores capital letters by default, so "apple" and "Apple" sit together. Turn on case-sensitive sorting to use strict character order, where all capitals come before lowercase letters (as in most programming languages). You can also remove duplicates and blank entries while sorting.

How to use the alphabetical order sorter

  1. 1Paste your list into the box.
  2. 2Tell the sorter whether items are on separate lines, separated by spaces or by commas.
  3. 3Choose A–Z, Z–A, natural, by length, reverse or random order.
  4. 4Optionally remove duplicates, blank items, or make the sort case-sensitive.
  5. 5Copy the sorted list back into your document or spreadsheet.

Formula and method

The input is split into items by line breaks, whitespace or commas, and each item is trimmed. A–Z sorting compares items character by character using Unicode code order on lower-cased text (ties broken by the original text), so capitalisation does not scatter related words. Case-sensitive mode compares the raw text, which places A–Z capitals before a–z.

Natural order splits each item into runs of digits and non-digits and compares digit runs as numbers, so "file 9" sorts before "file 10". Length sorting counts characters and breaks ties alphabetically. Random shuffle is a Fisher–Yates shuffle driven by a seeded pseudo-random generator, so a given seed always gives the same order. Accented letters sort after plain letters under code order.

Worked examples

Alphabetize a mixed-case fruit list

Ignoring capital letters, the six fruits sort A to Z as Apple, banana, Blueberry, cherry, kiwi, Mango — "banana" comes before "Blueberry" because "a" precedes "l" in the second letter.

Natural order for numbered files

Plain A–Z order would give file1, file10, file2, file20 because "1" sorts before "2" character by character. Natural order compares the numbers 1, 2, 10 and 20 by value instead.

Comma-separated tags, Z–A with duplicates removed

The six tags include a second "ads" and "SEO" (a case variant of seo), so 2 duplicates are removed. The remaining 4 are sorted from Z to A and re-joined with commas.

Sort words by length

The 3-letter words come first (fox and the, in A–Z order), followed by the 5-letter words brown, jumps and quick.

Frequently asked questions

How do I put a list in alphabetical order?+

Paste the list with one item per line, choose "Alphabetical A → Z" and copy the result. For comma-separated lists, set the separator to commas first so each item is sorted separately.

Why does 10 come before 2 when I sort?+

Standard alphabetical sorting compares text one character at a time, and "1" comes before "2". Choose natural order to compare the numbers inside items by their value, so 2 comes before 10.

Does the sorter ignore "The" or "A" at the start of titles?+

No. Items are sorted exactly as written, so "The Beatles" sorts under T. If you want library-style sorting, move leading articles to the end ("Beatles, The") before sorting.

How do I alphabetize in Excel or Google Sheets?+

Select the column and use Data → Sort A to Z (Excel) or Data → Sort range (Sheets). This tool is quicker for text outside a spreadsheet and also supports natural order and length sorting.

Is the random shuffle truly random?+

It is a Fisher–Yates shuffle driven by a seeded pseudo-random generator — fair enough for classroom draws, playlists or test data, but not for lotteries, security or anything where the result must be unpredictable. The same seed always repeats the same shuffle, so change the seed for a fresh order.

Related tools