Text Line Sorter

Sort lines alphabetically, by length, numerically, randomly or in reverse.

Paste lines and instantly reorder them: A→Z, Z→A, by length, by leading number, randomly shuffled or simply reversed. Optionally drop duplicates as you sort. Runs entirely in your browser — no signup, no tracking.

Common use cases

  • Alphabetise CSV or shopping lists before importing into a spreadsheet
  • Sort log lines by length to find anomalously short or long entries
  • Shuffle a list of names for fair raffle draws or random team picks
  • Reverse-sort numeric leaderboards or version numbers

Frequently asked questions

How does numeric sort handle mixed text?▾
It looks for the first number in each line and sorts by that value. Lines without a number sort as zero.
Is the random shuffle truly random?▾
We use Fisher-Yates with the browser's Math.random — uniformly random, but not cryptographically secure. Click 'Re-shuffle' for a new arrangement.
Can I sort case-insensitively?▾
Yes — A→Z and Z→A use locale-aware compareString, which treats 'apple' and 'Apple' equivalently for ordering.

Related tools