How to alphabetize a list
- Paste or type your list in the Your list box. One item per line works best, but comma or semicolon separated lists are detected automatically.
- Pick A to Z or Z to A. The sorted list on the right updates instantly.
- Tick the options you need: natural number order, ignore articles, sort by last name, remove duplicates.
- Choose how the output is joined (new lines, commas, or commas with a space) so it pastes cleanly into its destination.
- Press Copy or Download .txt. The item counts above each box show how many lines went in and came out.
What each option does
- Split input by: Auto-detect uses new lines if your text has more than one line, otherwise semicolons, otherwise commas. So "pear, fig, apple" is read as three items, while "Smith, John" on separate lines stays one item per line. Pick a separator yourself if the guess is wrong.
- Natural number order: computers compare text character by character, so "file10" normally lands before "file2" because 1 comes before 2. Natural order reads whole numbers as numbers: file1, file2, file10. It is on by default because it is what people expect.
- Ignore The, A, An: library and record-shop style. "The Beatles" is filed under B and "A Tribe Called Quest" under T. The item itself is not changed, only where it is sorted.
- Sort by last word: for lists of full names like "Ada Lovelace", this sorts by surname (Lovelace) without you having to rewrite each line as "Lovelace, Ada".
- Case-sensitive: by default "apple" and "Apple" are treated as the same word and keep the order you typed them in. Turn this on to put capitals first when two items differ only by case, and to make duplicate checks exact.
- Trim spaces and remove empty lines: pasted text often carries trailing spaces and blank lines. These options tidy them so they do not create stray empty items at the top of the result.
- Remove duplicates: keeps the first occurrence of each item. With Duplicates ignore case ticked, "Apple" and "apple" count as the same item.
- Reverse and Shuffle: reverse flips the current result, shuffle puts it in a random order using your browser's secure random generator. Change any option and the list is sorted again.
Alphabetical order examples
These results were produced by the same code the tool runs, so you can see exactly how each option changes the order.
| Option | Input | Result |
|---|---|---|
| Plain A to Z | file10.txt, file2.txt, file1.txt, file20.txt | file1.txt, file10.txt, file2.txt, file20.txt |
| Natural number order | file10.txt, file2.txt, file1.txt, file20.txt | file1.txt, file2.txt, file10.txt, file20.txt |
| Plain A to Z | The Rolling Stones, Abba, The Beatles, A Tribe Called Quest, Blondie | A Tribe Called Quest, Abba, Blondie, The Beatles, The Rolling Stones |
| Ignore The, A, An | The Rolling Stones, Abba, The Beatles, A Tribe Called Quest, Blondie | Abba, The Beatles, Blondie, The Rolling Stones, A Tribe Called Quest |
| Plain A to Z | Grace Hopper, Ada Lovelace, Alan Turing, Katherine Johnson | Ada Lovelace, Alan Turing, Grace Hopper, Katherine Johnson |
| Sort by last word | Grace Hopper, Ada Lovelace, Alan Turing, Katherine Johnson | Grace Hopper, Katherine Johnson, Ada Lovelace, Alan Turing |
| Accented letters | Zoë, Émile, Eva, Åsa, Anna | Anna, Åsa, Émile, Eva, Zoë |
How accents, numbers and symbols are sorted
The tool uses your browser's built-in language-aware comparison (the same Intl.Collator engine behind spreadsheet and
file-manager sorting), not raw character codes. That has a few practical effects:
- Accented letters sort with their base letter. Émile sits between David and Eva, not after Z. When two words differ only by an accent, the unaccented one comes first: zoe, then zoë.
- Numbers come before letters, and with natural order on, 9 comes before 25, which comes before 100.
- Spaces and punctuation sort before letters, so "New York" comes before "Newark". This is word-by-word order, the style most indexes and phone books use.
- Sorting is stable. Items that compare as equal (for example "Apple" and "apple" in case-insensitive mode) keep the order you typed them in, in both directions.
Sorting follows general English alphabet rules. Some languages have their own conventions, for example Swedish files Å after Z and Spanish once treated "ch" as a letter, so check the result if you are preparing an index in another language.
Common uses
Bibliographies and reference lists
APA, MLA and Chicago all list references alphabetically by the first author's surname. Paste one reference per line and sort A to Z. Entries already start with the surname, so leave Sort by last word off.
Names, guest lists and class rosters
Paste "First Last" names and tick Sort by last word to get a surname-ordered list without retyping. Turn on Remove duplicates to merge lists collected from several sign-up sheets.
Glossaries, tags and keywords
Sorting a keyword list and removing duplicates is the fastest way to spot near-duplicates and gaps. Join the output with commas to paste it straight into a tag field.
Code and configuration
Keep import lists, dependency lists, CSS properties or enum values in a predictable order to reduce merge conflicts. Natural order keeps v2 before v10.
If you need to compare two versions of a sorted list afterwards, paste them into a diff checker: sorted lists make differences easy to read.
FAQ
How do I put a list in alphabetical order in Word or Google Docs?
In Word, select the lines and use Home, then Sort (A to Z). In Google Docs there is no built-in sort, so paste the list here, sort it, copy it and paste it back. This tool also handles duplicates and "The" prefixes, which Word does not.
Does capitalisation affect alphabetical order?
Not by default. "apple", "Apple" and "APPLE" are treated as the same word, which is how dictionaries work. Tick Case-sensitive if you want capitals first or exact-match duplicate removal.
Why does file10 come before file2?
Plain alphabetical sorting compares one character at a time, and "1" is less than "2". Turn on Natural number order to sort by the full number instead, so file2 comes before file10.
Can I alphabetize a comma separated list?
Yes. Paste it on one line, auto-detect splits it by commas, and you can join the result with commas again (with or without a space) or put each item on its own line.
Is my list sent to a server?
No. Sorting happens entirely in your browser with JavaScript, so private names or data never leave your device.