Alphabetize any list instantly — sort A–Z, Z–A, by length, or shuffle randomly.
🔒 Runs in your browser — your text never leaves this pageA sort lines tool — sometimes called an online list sorter or alphabetize tool — takes a block of plain text, splits it into individual lines, and rearranges those lines according to a rule you choose: A to Z, Z to A, shortest to longest, longest to shortest, or a random shuffle. The result is an instantly organized list you can copy and use anywhere.
The need to alphabetize a list or arrange items in a specific order comes up constantly across many fields. Students assemble bibliography entries that must be in alphabetical order. Developers maintain navigation arrays and configuration files where sorted order makes diffs easier to review. SEO professionals organize keyword lists before analysis. Writers compile glossaries. The task is repetitive and tedious when done by hand — especially for lists with hundreds of items.
This online alphabetizer handles all of that in one click, directly in your browser. Your text never leaves your browser — everything is processed locally, so your data remains completely private. No account, no upload, no waiting. Paste, sort, copy — done.
| Input list | Sort mode | Output |
|---|---|---|
| Tokyo Berlin Madrid Oslo Cairo |
A → Z (alphabetical) | Berlin Cairo Madrid Oslo Tokyo |
| Tokyo Berlin Madrid Oslo Cairo |
Z → A (reverse alphabetical) | Tokyo Oslo Madrid Cairo Berlin |
| Tokyo Berlin Madrid Oslo Cairo |
Shortest first (by character count) | Oslo Cairo Tokyo Berlin Madrid |
| Tokyo Berlin Madrid Oslo Cairo |
Longest first (by character count) | Berlin Madrid Tokyo Cairo Oslo |
| Tokyo Berlin Madrid Oslo Cairo |
Random shuffle | Cairo Tokyo Oslo Madrid Berlin (order varies each run) |
Paste your list into the Input box above — one item per line — and select the "A → Z" sort mode. The alphabetized result appears instantly on the right. Click "Copy result" to copy it to your clipboard.
To alphabetize a list means to arrange its items in alphabetical order from A to Z, following the sequence of the English alphabet. It is the standard ordering used in dictionaries, indexes, bibliographies, and most reference documents.
The tool sorts text lexicographically (dictionary order), which means numbers are sorted as text strings rather than numeric values. In lexicographic order, "10" comes before "9" because "1" comes before "9". For true numeric sorting, use a spreadsheet application like Google Sheets or Excel.
"Shortest first" ranks lines from fewest characters to most, and "Longest first" does the reverse. Lines of equal length maintain their original relative order. This mode is useful for detecting outliers in a dataset, formatting tables, or processing text in order of complexity.
The default A–Z sort is case-sensitive, which means uppercase letters sort before their lowercase equivalents. "Berlin" would appear before "amsterdam" because "B" has a lower Unicode code point than "a". Enabling "Case-insensitive" normalizes all characters to lowercase before comparing, giving a pure alphabetical result regardless of capitalization.
The shuffle uses the Fisher-Yates algorithm driven by JavaScript's Math.random(), a pseudo-random number generator seeded by your browser's entropy. The result is random enough for everyday purposes — surveys, raffle draws, or randomizing presentation order — but it is not cryptographically secure and should not be used for security-sensitive applications.
Your text never leaves your browser — everything is processed locally using JavaScript on your device. Nothing is sent to a server, stored, or logged. The tool works entirely offline once the page has loaded.