Sorting is one of those things that looks trivial until you need it
Open a list, sort it. That's the whole job. The reason "sort lines online" is a real search query, instead of "use sort -u in your terminal", is that the people who need it most aren't on a terminal. They're in a CMS, an email client, a Google Docs comment, or a spreadsheet that won't sort the way they want.
This page handles every common case: alphabetical, alphabetical reverse, by length, by length reverse, numeric, numeric reverse, document-order reverse, and shuffle.
The "natural sort" thing
A plain string-sort puts file10.png before file2.png because it compares character by character, where '1' beats '2' as a single character regardless of what follows. Humans read those filenames as numbers and expect 2 < 10. Natural sort fixes the gap.
The toggle on this tool uses JavaScript's Intl.Collator with the numeric: true option, which is the same algorithm macOS Finder, Windows Explorer, and most modern CLIs use. It detects embedded numeric runs and compares them as numbers, so v1.2.10 correctly sorts after v1.2.9 and chapter-2-the-fall.md sorts before chapter-10-the-rise.md.
Keep it on for filenames, version numbers, episode lists, and anything where embedded numbers should be ordered numerically. Turn it off only if you want strict character-by-character comparison.
When to use numeric sort instead of alphabetical natural
Numeric sort treats each whole line as a single number, so the leading numeric value wins and the rest of the line is a tiebreaker. Use this when every line starts with a number and the number is what you care about: leaderboard scores, prices, line numbers from a log, ranks.
Natural alpha sort treats each line as a string with embedded numbers. Use this when the line is a string that happens to contain numbers: filenames, version strings, episode titles.
The two modes look identical for clean numeric lists. They diverge the moment you have lines like 2nd place vs 10th place (numeric mode reads the leading number; alpha-natural reads the whole string and orders the same way).
Sort doesn't dedupe
Sorting puts duplicates next to each other but does not remove them. If you want unique sorted output (the classic sort -u), run the result through Remove Duplicate Lines afterwards. Two operations, two tools, one paste between them.
We chose to split these instead of bundling because each operation is independently useful. Sometimes you want to sort and keep duplicates (frequency analysis), sometimes you want to dedupe without sorting (preserve original order). One combined "sort + unique" tool would force the wrong default in half the cases.
The shuffle case
Shuffle randomizes line order using a deterministic pseudo-random generator. Same seed = same output. Hit "Shuffle" again to bump the seed and get a fresh permutation.
Don't use this for security-critical randomness. The LCG algorithm is fast and good for human use cases (rearrange a brainstorm list, randomize draft order, scramble a quiz answer key) but isn't crypto-grade. For cryptographic shuffling, use a real RNG in code.
Sort is also how you find anomalies
A surprising use of sort: spotting outliers. Sort a list of file sizes by length and the giant entries jump to the top. Sort a list of error messages alphabetically and identical errors cluster. Sort a list of timestamps and the gaps reveal time skips. The pattern is "sort, then scan": sort makes the data legible to a quick visual pass.
This is one of the reasons every grizzled engineer reaches for sort in a shell pipeline. You're rarely sorting because the order itself matters; you're sorting because the next operation works better on sorted data.