Alphabetize any list instantly — sort A–Z, Z–A, by length, or shuffle randomly.
This tool splits whatever you paste into separate lines — one item per line — and reorders them by the rule you pick: A to Z, Z to A, shortest to longest, longest to shortest, or a random shuffle. Four toggles refine the result: case-insensitive comparison, whitespace trimming, removing blank lines, and deduplication. The output rebuilds the instant you type or change a setting, so there's no button to hunt for.
| 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) |
Sorting is lexicographic (character by character), not numeric. The tool compares the first character of each line: "1" comes before "9", so "10", "11", and "100" all land ahead of "9". To get true numeric order, pad your numbers with leading zeros (009, 010) before sorting, or use a spreadsheet's numeric sort.
By default the sort is case-sensitive, so all uppercase letters rank before lowercase ones — "Banana" lands before "apple" because capital "B" has a lower code point than lowercase "a". Tick "Case-insensitive" to compare letters by value regardless of capitalization, which gives the dictionary-style order most people expect.
"Shortest first" and "Longest first" rank lines purely by character count, ignoring the letters themselves — so "zoo" sorts ahead of "apple" because it is shorter. Lines of equal length keep their original relative order. It's handy for lining up table columns or spotting an unusually long or short entry in a dataset.
"Trim whitespace" (on by default) strips leading and trailing spaces before sorting, so " apple" and "apple" sort together. "Remove empty lines" drops blank rows entirely instead of clustering them at the top or bottom. Leave both off and empty lines are kept and sorted as zero-length strings — which, in length mode, places them first.