Line Sorter
Sort lines A-Z, Z-A, by shortest, by longest, or shuffle randomly.
How to use this tool
- 1Paste your lines into the left Input panel.
- 2Click a sort mode button: A → Z, Z → A, Shortest first, Longest first, or Shuffle.
- 3The sorted output appears instantly in the right panel.
- 4Click Copy to copy the result.
About Line Sorter
Sorting a list of items manually is tedious and error-prone. This tool splits your input on newlines and applies one of five sort modes via toggle buttons: A to Z (localeCompare ascending), Z to A (localeCompare descending), Shortest first (by character length ascending), Longest first (by character length descending), or Shuffle (random order using Math.random). localeCompare handles accented characters and locale-specific ordering correctly — 'cafe' and 'café' sort in the right relative position. The Shuffle mode is useful for randomising a list of names for a raffle or generating a random question order. The output appears side by side with a Copy button. Switching modes re-sorts instantly without re-pasting. Developers sorting import lists, writers alphabetising bibliographies, and data analysts ordering keyword lists are the primary users.