What the Alphabetical Order Sorter does
This sorter puts any list into alphabetical order - names, words, titles, file names or comma-separated tags - A to Z or Z to A, as you type. Paste one item per line or a comma-separated list, and choose whether capital letters, accents, duplicates and a leading "The" should count.
Alphabetical order sounds like one rule, but it is several. A plain computer sort puts every capital letter before every lower-case one, so "Zebra" lands above "apple", and "file10" above "file2". This page uses your browser's built-in collation (the Unicode Collation Algorithm with each language's own alphabet), which is how dictionaries, phone books and well-made spreadsheets order words. Nothing you paste leaves the page.
How to use it
- Paste or type your list. Line breaks, commas, semicolons, tabs and spaces are detected automatically; open More options to say which one your list uses if the guess is wrong.
- Pick A to Z or Z to A. Capital letters and accents are ignored by default, and numbers inside items sort by value, so "Chapter 2" comes before "Chapter 10".
- Tick Remove duplicates to keep only the first spelling of each item, Ignore The, A, An to file "The Beatles" under B, or Sort names by last word to order a list of people by surname.
- Copy the sorted list, download it as a text or CSV file, or press Use as input to keep editing the sorted version.
Reading the results
The big number is how many items are in the sorted list, with the first and last item so you can see at a glance that the order is right. If duplicates were removed, the count under Duplicates removed tells you how many went and the note lists them.
The letter badges show how many items start with each letter, which is a quick way to spot a list that is lopsided or an item that starts with a stray space or symbol (filed under #).
Two items that differ only in capitals - "apple" and "Apple" - are equal under the default settings, so they sit next to each other; lower case comes first unless you tick Capitals first. The order is otherwise exactly what the chosen language's alphabet says.
Worked example: a class list sorted by surname
Eight names arrive as typed: Priya Sharma, James O'Brien, Aisha Khan, David Smith, María García, Tom Anderson, Li Wei and Sophie Martin.
With Sort names by last word ticked, each name is filed under its surname: Anderson, García, Khan, Martin, O'Brien, Sharma, Smith, Wei. Accents are ignored, so García files as Garcia, between Anderson and Khan.
The result reads Tom Anderson, María García, Aisha Khan, Sophie Martin, James O'Brien, Priya Sharma, David Smith, Li Wei - eight items, A to Z, ready to paste into a register. The badges show A, G, K, M, O, S (2) and W, which confirms no name was filed under its first name by mistake.
Why a computer sort and an alphabetical sort disagree
Text is stored as numbers, and the simplest sort just compares those numbers. In ASCII and Unicode every capital letter (A = 65 to Z = 90) comes before every small letter (a = 97), digits come before both, and an accented letter such as é (233) comes after z. Sorting by those codes gives "Zebra, apple, éclair" - correct for a computer, wrong for a reader.
Collation fixes that by comparing letters first, then accents, then case, in that order of importance. Natural number order goes a step further and reads runs of digits as numbers, which is why "Track 9" now precedes "Track 10".
Different languages, different alphabets
There is no single alphabetical order. In English and German, ä sorts with a; in Swedish and Finnish, å, ä and ö are separate letters after z; in Danish and Norwegian the last three letters are æ, ø, å; in Spanish ñ follows n. Choose the language of the list under More options and the browser applies that language's published tailoring of the Unicode Collation Algorithm.
Skipping "The", "A" and "An" is a filing convention used by libraries, record shops and many style guides, not a rule of the alphabet. It is applied only to those three English words, at the start of an item, so "Theatre Royal" still files under T.
Limitations: what the result does not prove
- Sorting by last word is a simple rule. Compound surnames ("van der Berg", "García Márquez"), suffixes such as Jr. or III, and names written family-name-first need checking by eye.
- Only English articles are skipped. "Le", "La", "Der" or "El" at the start of an item are treated as ordinary words.
- The order follows your browser's collation data. Current Chrome, Edge, Firefox and Safari agree for common languages, but very old browsers may place rare characters differently.
- Each item is sorted as a whole; this is not a spreadsheet sort by column. For a table, sort by a column in the spreadsheet itself or extract the column first.
- Lists are limited to 50,000 items and two million characters so the page stays responsive.
Privacy: where your data goes
Everything you paste, type or drop is processed in this browser tab. It is not uploaded, logged, stored or sent to analytics. Session recording and tag-manager scripts are switched off on this page.
Standards and sources
- Unicode Technical Standard #10 - Unicode Collation Algorithm
- ECMA-402 - Intl.Collator (ECMAScript Internationalization API)
- MDN - Intl.Collator options (sensitivity, numeric, ignorePunctuation)
- CLDR - Collation charts by language
Frequently asked questions
How do I put a list in alphabetical order quickly?
Paste the list into the box, one item per line or separated by commas, and the sorted version appears straight away. Press Copy sorted list and paste it wherever you need it - there is nothing to install and the list stays in your browser.
How do I alphabetize a list of names by last name?
Tick Sort names by last word. Each name is filed under its final word, so Jane Smith sorts under S and Bob Adams under A. Names already written as Smith, Jane are left as they are. Check double-barrelled surnames by eye.
Should "The" be ignored when sorting titles alphabetically?
Most libraries, record shops and style guides ignore a leading The, A or An, so The Beatles files under B. Tick Ignore The, A, An at the start to sort that way; leave it off if you want strict letter-by-letter order.
Why does 10 come before 2 when I sort in Excel or a text editor?
A plain text sort compares character by character, and the character 1 comes before 2, so 10 lands first. Natural number order, on by default here, reads each run of digits as a number, giving 1, 2, 10 - the order people expect.
Do capital letters come before lower-case letters in alphabetical order?
Not in dictionary order: apple, Banana and cherry are ordered by their letters regardless of case. Capitals only come first in a raw computer sort. When two words differ only in case, this tool puts lower case first unless you tick Capitals first.
How are accented letters like é, ñ and ö sorted?
It depends on the language. In English é sorts with e, but Spanish treats ñ as its own letter after n, and Swedish puts ö after z. Choose the language under More options and the browser applies that language's alphabet.
Can I remove duplicates while sorting a list?
Yes. Tick Remove duplicates and only the first spelling of each item is kept. With capitals and accents ignored, Apple, apple and APPLE count as one item; untick those options to treat them as different.
Last reviewed by the A2Z.Tools team against the sources listed above.