The quick answer
Paste a list with one item per line and pick one of six orders: A → Z, Z → A, natural (file2 before file10), by last name, by line length, or numeric. A Remove duplicates checkbox cleans case-insensitively and reports the count; blank lines are always dropped. Copy the list or download sorted.txt. The list never leaves your browser.
How to use the alphabetical sorter
Paste your list, one item per line
The input box takes any number of lines. Load example drops in a five-fruit sample list (banana, apple, date, cherry, elderberry) if you want to watch the modes work before pasting your own.
Choose a sort mode
Six buttons: A → Z (plain alphabetical), Z → A (the same order reversed), Natural (numeric-aware), By last name, By line length, Numeric. The output re-renders the moment you switch, so comparing two orders on the same list takes two clicks.
Tick Remove duplicates if you want a clean list
The checkbox removes repeated lines case-insensitively, "Apple" and "apple" count as one, keeping the first spelling you pasted. The note under the output states the line count and how many duplicates went.
Copy or download
Copy puts the sorted list on your clipboard with each item on its own line; Download saves it as sorted.txt. Clear resets for the next list.
Alphabetical, in the dictionary sense
A → Z is a locale-aware, case-insensitive comparison, the same collation a dictionary uses, not the raw character-code order programmers get by default. The difference is visible on three inputs every real list contains:
- Case: dictionary order interleaves capitals, so apple, Banana, cherry. Raw code order puts every uppercase word before every lowercase one, which is never what a person alphabetizing wants.
- Accents: café sorts next to cafe, not after czar, because the comparison treats an accented letter as its base letter with a tie-breaker, not as a high-numbered code point.
- Digits and punctuation: they compare in a sensible position rather than splitting weirdly by code point.
Ties keep their pasted order: if two lines compare exactly equal ("Smith" and "Smith"), the one you pasted first comes out first. That stability matters more than it sounds, because it lets you paste a list that is already grouped and alphabetize inside the groups without the groups shuffling.
Natural order: the file10 problem
Plain alphabetical sort reads strings character by character, so "file10" sorts before "file2": the "1" character comes before "2", and the sort never notices that 10 is a bigger number than 2. Every folder of screenshots, every set of chapter files and every versioned export hits this eventually:
Input
screenshot10.png screenshot2.png screenshot1.png screenshot20.png screenshot3.png
Output
A → Z: screenshot1, screenshot10, screenshot2, screenshot20, screenshot3, numbered like a bad PIN. Natural: screenshot1, screenshot2, screenshot3, screenshot10, screenshot20, the order a human means.
Natural sort, the mode's button says Natural (file2 before file10) because that is the whole point, compares runs of digits by their numeric value while comparing everything else alphabetically. Use it for file names, chapter numbers, street addresses, invoice numbers and version strings. The underlying machinery is a numeric-aware Unicode collator, the same idea file managers use.
By last name, and its honest edge
By last name sorts each line by its final whitespace-separated token, falling back to the whole line when two people share a surname. "Jane Austen" and "Zadie Smith" order Austen-first without you editing the names into Last, First format: paste the list as it is, get a roster out.
The edge: the rule files "Ludwig van Beethoven" under Beethoven and "Martin Luther King Jr." under Jr. For most class rosters and contact lists, sorting under the true surname is exactly right. For genealogy, legal citations and cultures where the final token is not the surname, tick it with eyes open; no whitespace-based rule can know which token is the family name without a real name parser. If your list is already in "Last, First" format, plain A → Z is the correct button, because the surname leads the line.
Numeric and By line length
Numeric mode reads the leading number on each line, "3 eggs" counts as 3 and "1.5 cups" as 1.5, and sorts by value. Lines without a number count as zero and cluster at the start. It is the mode for recipe quantities, stock counts and any list whose first character carries the meaning. Fractions written as "1/2" do not parse as fractions (the mode reads the leading 1), and lines starting with currency symbols or thousands separators need a quick strip first.
By line length orders shortest to longest. Two uses dominate: cleaning a junk-flecked export (accidental one-character lines surface instantly at the top) and staging lists where the short entries are the headliners, hashtag sets, keyword lists, shell globs. Note that only the alphabetical pair has a reversed variant: the Z → A button flips A → Z, and the other four modes sort in one direction each.
Remove duplicates, honestly counted
The checkbox dedupes before sorting, case-insensitively: "Apple", "apple" and "APPLE" are one entry, and the spelling that survives is the first one you pasted, capitalization and all. The note under the output reports the working count and the removal count separately, in the form "12 lines sorted (alpha), 4 duplicates removed", because a dedupe that does not tell you what it removed is a dedupe you cannot trust on a client list.
What it does not dedupe: lines that differ by invisible characters. A trailing space makes "apple " a different line from "apple", and a zero-width space hides from every eyeball. If the count looks one too high, run the list through the Whitespace Cleaner first, which normalizes stray spaces and blank lines, then sort here.
What this tool deliberately is not
The sorter treats every line as one whole string, and that is a feature: it makes the behavior predictable for any list you can paste. Three jobs people bring here actually belong to neighbors:
- Sorting CSV rows by a column: the CSV Sort by Column tool parses the header row and orders whole rows by the column you pick. This page would shuffle the fields of every line it touches.
- Reordering a numbered outline where the numbers lead: Numeric mode works, but a dedicated renumbering pass is usually what people actually want.
- Randomizing: the Shuffle Lines tool lives on its own page, and the two never silently mix.
Five lists people actually paste here
The lists that reach an alphabetizer fall into five recurring shapes. The mode each one wants:
- The class roster or contact list, names in First Last order, messy capitalization, a few doubled entries. By last name, Remove duplicates ticked.
- The bibliography, entries that need plain A → Z while their leading articles (A, An, The) stay in place, because the sorter compares whole strings exactly as pasted. Citation styles that require ignoring leading articles need that pass done by hand after.
- The screenshot folder pasted from a file manager, file1, file10, file2 chaos. Natural mode, and the numbers finally mean what they say.
- The brainstorm, sixty ideas, duplicates from three people thinking alike. A → Z with Remove duplicates, then read the count: the dedupe number is the meeting's honesty metric.
- The ingredient or supply list with quantities leading each line, "2 eggs", "0.5 cups". Numeric mode puts the list in working order for the kitchen or the order form.
Input
jane austen Zadie Smith jane austen Marilynne Robinson Toni Morrison
Output
By last name + Remove duplicates: jane austen, Toni Morrison, Marilynne Robinson, Zadie Smith, filed under Austen, Morrison, Robinson, Smith, with the doubled Austen line removed (1 duplicate, reported in the note).
Sorting text in other languages
The comparison uses locale-aware collation, which is why accented Latin text sorts the way a dictionary sorts it: café beside cafe, with the accent as a tie-breaker rather than a separate distant letter. Cyrillic, Greek, Arabic and Hebrew each sort within their own block. Two honest notes for multilingual lists. German lists sometimes expect ä to sort as ae and ö as oe (phone-book order); the default here treats them as accented a and o. And Chinese offers several legitimate orders, pinyin, stroke count, radical, none of which a default collator can pick for you; paste a Chinese list and you get one consistent order, not necessarily the order your reader expects. For a single-language list that must follow national conventions, sort in a tool configured for that locale and verify the first ten lines.
Alphabetical Sorter vs the alternatives
| Tool | Sort orders | Natural order | Dedupe | Where the list goes |
|---|---|---|---|---|
| Toolzep Alphabetical Sorter | 6 modes | Yes | Case-insensitive, counted | Stays in your browser |
| WordCounter.net alphabetize | A-Z / Z-A | Sometimes | Yes | Server-side |
| Alphabetizer.flap.tv and similar | A-Z / Z-A | Rarely | Varies | Server-side |
| Excel / Google Sheets sort | By any column | No | Manual | Your spreadsheet |
| Unix sort (command line) | Many flags | With -V | sort -u | Local |
The spreadsheet comparison deserves its own sentence: if your list already lives in a sheet with more columns attached, sort it there, because moving data out to alphabetize and back invites import errors. This page is for the free-standing list: the pasted names, the brainstorm, the export with one column, the pile of file names. One paste, one click, ordered.
Frequently asked questions
These are the questions people actually search about alphabetical order, answered directly.
How do I alphabetize a list?
Paste one item per line, leave the mode on A → Z, and the sorted list appears instantly. Copy or download it. The sorting is locale-aware and case-insensitive by default, so "banana" and "Banana" interleave correctly and accented letters sort where a dictionary would put them.
Is the alphabetical sort case-sensitive?
No. Uppercase and lowercase versions of the same letter compare as equals, so "apple" and "Banana" sort in dictionary order regardless of capitalization. Ties between lines that differ only in case keep their original pasted order, because the underlying sort is stable.
What is natural sort?
Natural sort orders numbers inside text by numeric value instead of character code: file2 comes before file10, because 2 is less than 10. Ordinary alphabetical sort puts file10 first because the character "1" precedes "2". Use natural sort for file names, chapter numbers, addresses and version lists.
How does By Last Name work?
It sorts by the last whitespace-separated token on each line, so "Jane Austen" files under Austen. Lines that tie on the last name fall back to comparing the whole line. Known limitation: "Ludwig van Beethoven" files under Beethoven, which is what most name lists want, but not all.
Does the sorter remove duplicates?
Only when you tick Remove duplicates. The dedupe is case-insensitive ("Apple" and "apple" are one entry) and keeps the first occurrence's original capitalization. The note under the output reports exactly how many were removed, and unticked, duplicates are left untouched.
Are blank lines removed?
Yes. Empty lines are stripped before sorting, always. A list with gaps pastes in as a clean list out the other side.
Can it sort a CSV by a column?
Not this page. The sorter treats every line as a whole string, so sorting a CSV here would shuffle the fields of every line it touches. For sorting rows by a specific CSV column, use the CSV Sort by Column tool: it parses the header row and orders whole rows by the column you pick.
What does the Numeric mode do with lines that are not numbers?
Numeric mode reads each line's leading number and sorts by it; lines with no number count as 0 and cluster at the start. It is built for lists like "3 eggs" or "1.5 cups", pricing and inventory lines, not for comparing full sentences.
How do I sort by line length?
Pick By line length: lines order from shortest to longest. It is the classic fix for logistics lists and shell-glob outputs where short entries matter most, and a quick way to spot accidental one-character junk lines.
Is my list uploaded anywhere?
No. Sorting runs in JavaScript in your browser; nothing is transmitted or stored, and the page keeps working offline.
Sources and further reading
Sources and further reading
- Unicode Technical Standard #10: Unicode Collation Algorithm (how dictionary order is defined for all scripts)(unicode.org)
- MDN Web Docs: Intl.Collator (numeric collation for natural order)(developer.mozilla.org)
- MDN Web Docs: String.prototype.localeCompare (locale-aware comparison)(developer.mozilla.org)
- ECMAScript Internationalization API Specification (ECMA-402): collation options(tc39.es)
We cite primary sources (standards bodies, government agencies, official documentation) wherever they exist so you can verify every number on this page yourself.