🔃 Sort Lines
Paste lines, choose an order — alphabetical, by length, reversed or random shuffle.
4 lines sorted
How the sort lines works
Alphabetical modes use natural, case-insensitive ordering — so "item 2" correctly sorts before "item 10" (a plain character sort would reverse them). Length modes compare character counts; shuffle applies an unbiased Fisher–Yates permutation.
Natural ordering is the quiet superpower here: filenames, version numbers and numbered lists sort the way humans expect instead of the way ASCII does.
Frequently asked questions
Why does "item 10" sort after "item 2" here but not in other tools?
This tool uses natural ordering, which compares embedded numbers by value. Plain character sorting puts "10" before "2" because the character 1 precedes 2.
Is the sort case-sensitive?
No — "apple" and "Apple" sort together. Case is preserved in the output, just not used to separate entries.
Is the shuffle really random?
It uses the Fisher–Yates algorithm with the browser’s random source — unbiased for everyday use (raffles, random orders), though not cryptographic-grade.
Can I sort and deduplicate together?
Run remove-duplicate-lines first, then sort — two clicks, and the pair of tools link to each other.
Does my list leave the browser?
No — sorting is local, instant and works offline.