Text Tools Runs in your browser Free · no account

Sort Lines

The line sorter reorders a list of lines alphabetically, numerically, by line length or randomly, ascending or descending. Sorting is locale-aware so accented characters land where a reader expects them.

Options
Lines 0 characters
Sorted lines

Your result will appear here.

Not sure where to start? Use Load example.

Results update automatically and are calculated on your device. Nothing you type is sent to a server.

Runs in your browser. Processing happens entirely in your browser. Nothing you enter is sent to Delimiter.live.

How to use the Sort Lines

  1. Paste your list with one item per line.
  2. Pick a sort mode: alphabetical, numeric, by length, or a random shuffle.
  3. Choose ascending or descending and whether case should matter.
  4. Copy or download the sorted list.

Example

Input
banana
apple
cherry
Output
apple
banana
cherry

Common use cases

  • Alphabetising a glossary, a bibliography or a list of names.
  • Ordering a list of numbers or prices exported from a spreadsheet.
  • Sorting keywords by length to spot the longest or shortest phrases.
  • Randomising a list to pick a winner or to shuffle test data.

Limitations and things to watch for

  • Alphabetical sorting uses natural ordering, so "item 2" comes before "item 10" rather than after it. This is usually what people want but differs from a strict byte sort.
  • Numeric sorting reads the first number found on each line. Lines with no number are grouped together at the end.
  • The random shuffle uses the browser random number generator and is not suitable for anything requiring verifiable fairness, such as a public prize draw.

Frequently asked questions

Does it sort numbers correctly?
Yes. Choose numeric mode and lines are ordered by the numeric value they contain, so 9 comes before 10. Even in alphabetical mode a natural sort is used, which keeps numbered lists in the right order.
How are accented characters handled?
Sorting is locale-aware, so é sorts next to e rather than after z, which is what most readers expect.
Can I remove duplicates at the same time?
Yes — tick "Remove duplicates while sorting" to get a sorted, unique list in one step.

Share this tool