Alphabetical Text Sorter
Sort lines alphabetically
Sort options
Lines sorted
0
First item
—
Last item
—
Sorting uses locale-aware comparison, so accented words (Émile, Škoda, Über) sort correctly instead of landing after Z. Natural order compares embedded numbers as values — chapter2 before chapter10 — instead of character-by-character.
About this tool
This free Alphabetical Line Sorter puts any list in order in one paste — drop in names, words, lines or entries of any kind, and the sorted result appears instantly, live as you edit, with one click to copy the ordered version. The tool covers the sorting directions lists actually need: A to Z ascending for the standard ordering, Z to A descending for the reverse view, and options that shape the sort to the list's shape — case-insensitive ordering so 'apple' and 'Banana' sort naturally rather than by their byte values, whitespace trimming so stray spaces don't nudge a line out of place, duplicate collapsing for lists that need order and dedupe in the same pass, and numeric awareness so lines beginning with numbers sort by value rather than by text. Live counts show how many lines went in, how many came out, and whether any duplicates fell away — so the sort is verifiable at a glance. The sorting itself is where naive implementations betray lists, and the care lives in the edge cases every real list carries. Case is the classic trap: a raw character-value sort puts every capital letter before every lowercase one — 'Zebra' sorts before 'apple' — which is why case-insensitive comparison is the default behavior a human reader expects and this tool applies by default. Numeric lines are the second: text-based sorting orders '10' before '9', because '1' sorts before '9' as characters — the failure every spreadsheet refugee has met — and numeric-aware ordering sorts by value instead. Whitespace is the third: leading spaces and trailing tabs make lines sort as slightly different strings than they read, which is why trimming before comparing keeps the sort honest. And order-stability is the fourth: lines that compare equal keep their original relative order, so equal entries don't shuffle unpredictably between runs. Each option is a toggle, and the sorted output updates on every keystroke — the sort is a live view, not a command. The workflows this tool fits span every kind of list ordering: the teacher alphabetizing student name lists, class rosters and reference lists for reports and displays; the writer and editor ordering glossaries, index entries, bibliographies and reference lists into the alphabetical conventions publications expect; the developer sorting config lists, package entries, domain lists and term files where ordered output is the deliverable; the data worker normalizing name lists, product lists and merged entries before import or analysis; the event planner and organizer alphabetizing attendee lists, invitation lists and sign-up sheets; the SEO practitioner sorting keyword lists and URL exports into reviewable order; and the everyday list rescue — the shopping list in the order remembered, the contact list that merged in chaos, the reading list that needs order to become usable. Paired with the site's Duplicate Line Remover for list cleanup and the Case Converter for normalization, this is the list-ordering member of the writing-tools family. Everything runs locally in your browser. Every sort is computed by client-side JavaScript on your device — the list you paste never reaches a server, is never logged and never stored. Disconnect from the internet after the page loads and the sorter keeps sorting. Close the tab and nothing remains anywhere.
Frequently asked questions
How do I sort a list alphabetically?+
Paste the list — one item per line — and the A-to-Z ordering appears instantly, live, with one click to copy the result. Each line is treated as one entry, so the tool sorts names, words, phrases, URLs and full lines of data identically: whatever a line contains is the unit being ordered. The directions cover both views — A to Z for the standard order, Z to A for the reverse — and options tune the sort to the list's shape: case-insensitive comparison so capitalization doesn't distort the order, whitespace trimming so invisible characters don't nudge lines out of place, and optional dedupe for lists that need cleanup and ordering in the same pass. The live update means editing the list re-sorts it instantly, so building an ordered list incrementally is a matter of typing. Paste, glance, copy — the whole loop takes seconds, which is the point.
Why does 'Zebra' sort before 'apple' — and how is that fixed?+
Because raw character-value sorting compares letter codes, and every capital letter's code comes before every lowercase one — so a naive sort orders all capitalized words before all lowercase ones, and 'Zebra' lands before 'apple' despite what every dictionary says. The fix is case-insensitive comparison, which compares letters as letters — 'a' and 'A' equal — and orders the list the way a human reader expects: 'apple' before 'Banana' before 'cherry' regardless of how each entry was typed. This tool applies case-insensitive ordering by default, with a toggle for the rare case-sensitive need — file lists and code contexts where case genuinely distinguishes entries. The mixed-case trap catches everyone eventually: any list merged from sources with different capitalization habits sorts incorrectly under a naive comparison, which is why the case-insensitive default is the difference between a sorted list and a technically-sorted one.
How does sorting work with numbers like 1, 10 and 2?+
Numeric-aware sorting orders by value — 1, 2, 9, 10 — while raw text sorting orders by characters — 1, 10, 2, 9 — and the difference is the classic failure of text-based sorting. The character version happens because '1' sorts before '2' as a character, so '10' lands right after '1' and before '2', producing the backwards-looking order every spreadsheet export and file listing has delivered at some point. Numeric-aware comparison reads the leading digits as a number and sorts by that value, which is what any list of numbered items needs: numbered entries, versions, quantities, dates written as digits. This tool applies numeric awareness to lines that begin with numbers, so mixed lists — some entries numbered, some not — sort sensibly rather than shattering into two differently-ordered halves. For lists where the number is the whole sort key, the toggle does the rest, and the live preview shows which behavior your list received.
Should I sort A to Z or Z to A?+
A to Z is the default for almost everything — name lists, glossaries, indexes, bibliographies and any list people will scan for an entry — because alphabetical order is a lookup convention: readers arrive knowing the letter they want, and A-to-Z puts it where they expect. Z to A earns its place in specific jobs: reverse-chronology-flavored views where the tail matters most, checking that an alphabetical sort actually worked — scanning the reverse order catches what forward scanning misses — and the occasional preference view, such as lists where the end of the alphabet carries the emphasis. The tool offers both with one click, and switching between them is instant — which makes the reverse view a free verification pass for any sort that matters: sort forward, glance, flip, glance, and if both views look ordered, the sort is real. For everything else, forward order and a clean copy is the whole job.
Can I sort and remove duplicates at the same time?+
Yes — the dedupe option collapses repeated lines during the sort, so a list that needs both treatments gets them in one pass. The combination is the natural state of merged lists: entries gathered from multiple sources arrive both unordered and duplicated, and sorting alone leaves the duplicates sitting next to each other — often the moment their existence becomes obvious at all. With dedupe enabled, identical lines collapse to a single entry, the live count shows how many fell away, and the sorted output contains each entry exactly once. The matching uses the same case and whitespace options as the sort — case-insensitive comparison collapses 'Apple' and 'apple' into one entry, trimming catches the paste-carried spaces that disguise duplicates. For lists that only need ordering, leave dedupe off; for lists that arrived from a merge, it is the option that turns two cleanup steps into one paste.
How do I sort names alphabetically with correct conventions?+
Paste one full name per line and sort A to Z — the tool orders by each line's first character, which sorts by first name, and that is the convention some lists want. For the by-last-name ordering that rosters, bibliographies and formal lists expect, the line needs the last name first: 'Smith, John' or 'John Smith' reordered before pasting — one pass of flipping the lines, then the sort does the rest. Two conventions make the result read professionally: consistent formatting across entries, since 'Smith, J.' and 'John Smith' sort differently, and the case-insensitive comparison this tool applies by default, which keeps 'de Vere' and 'Devereaux' ordering naturally rather than splitting by capitalization. For bibliographies and indexes, the last-name-first convention is the standard; for attendee lists and casual rosters, first-name order reads friendlier. Either way, one line per entry, one paste, and the order appears — the conventions live in how the lines were prepared, and the tool handles the ordering itself.
Does sorting work with any language or special characters?+
Yes — the comparison is Unicode-aware, so accented letters ('é', 'ñ', 'ü'), non-Latin scripts (Cyrillic, Greek, Arabic, Japanese) and mixed-script lists all sort as characters rather than breaking. One honest caveat for language purists: the ordering is by character value with case-insensitive comparison, not by each language's full collation rules — the conventions some languages apply for accented letters and letter combinations (Spanish's traditional treatment of 'ch' and 'll', German's 'ä' to 'a' alphabetization) are locale-specific rules that vary by country and style guide. For the overwhelming majority of list work — names, words, entries in any script — character-based ordering matches what readers expect, and mixed-script lists sort consistently. For publication-grade indexes in languages with special collation conventions, a locale-aware reference tool remains the final word; for every everyday sort, this one handles the paste.
Is the list I paste stored or sent anywhere?+
No — nothing leaves your device. Every sort runs entirely in your browser with client-side JavaScript: your list is never transmitted to any server, never logged and never stored. You can verify it directly: after the page loads, disconnect from the internet and the sorter keeps working, which is only possible because no network is involved. Close or refresh the tab and everything is gone — no history kept on this site or anywhere else. Name lists, attendee rosters and data entries are as private here as they would be in a local text editor on your own machine.