Sort your lines alphabetically, by length, numerically, or just shuffle them
You’ve got a list. It’s in the wrong order. Paste it here and pick your sort: A-Z, Z-A, shortest first, longest first, numerical, or random shuffle. There’s also a checkbox to strip out duplicates while sorting, and a case-sensitivity toggle.
That’s really all there is to it. Paste, sort, copy. Runs in your browser.
Sort options
- Alphabetical A-Z or Z-A, with optional case sensitivity
- By line length, shortest or longest first
- Numerical sorting (based on the number at the start of each line)
- Random shuffle using Fisher-Yates (unbiased, every ordering is equally likely)
- Duplicate removal during sort
- Case-sensitive toggle, decides whether “Apple” and “apple” are the same
- One-click copy
Using it
Enter your text with one item per line. Toggle case sensitivity and duplicate removal if needed. Click a sort button. Copy the result.
Example: you’ve got a list of 50 names in random order. Click A-Z and they’re alphabetized. Need them by length? Click “By Length” and the shortest entries float to the top. Want to pick a random winner? Shuffle it and grab the first line.
Practical uses
CSS property sorting: some style guides want CSS properties in alphabetical order. Paste your declaration block, sort A-Z, paste it back. Faster than doing it manually.
Organizing import statements: some linters enforce alphabetical imports. Sort them here instead of shuffling lines in your editor.
Data cleanup: enable duplicate removal while sorting to get a clean, unique, ordered list in one step. For more advanced duplicate analysis, the Duplicate Line Remover is the dedicated tool.
Numerical data: the numerical sort understands that “2 apples” should come before “10 bananas.” Alphabetical sort wouldn’t, it’d put “10” before “2” because it compares characters, not numbers.
Random draws: need to assign tasks randomly? Paste the names, shuffle, assign from top to bottom. Fisher-Yates means it’s genuinely random, not pseudo-shuffled.
Content management: sorting tags, keywords, or categories alphabetically makes them easier to scan and catches inconsistencies you’d miss otherwise.
When using numerical sort, the tool grabs the number at the start of each line. Lines without leading numbers get pushed to the end.
FAQ
How does numerical sorting work?
It parses the number at the beginning of each line and sorts by numeric value. “2 apples” comes before “10 bananas.” Lines without numbers go to the bottom.
Does duplicate removal care about case?
When case-sensitive mode is off, “Apple” and “apple” are treated as the same line. Only the first occurrence survives. Turn case sensitivity on to keep both.
Is the shuffle actually random?
Yes. It uses the Fisher-Yates shuffle algorithm, which gives every possible ordering an equal probability. It’s the standard for unbiased randomization.
Can I sort lines with multiple words?
Yes. Each line is one sortable unit, regardless of word count. Alphabetical sort compares from the first character onward.
Is my text private?
Yes. All sorting happens in your browser. Nothing leaves your device.