How does sorting lines work?
Sorting puts lines in order. The usual choice is alphabetical, A to Z or Z to A. But plain alphabetical order treats numbers as text, so "item10" comes before "item2" because the character 1 is less than 2. That is rarely what a person wants.
This tool offers several modes. Natural sort reads the digits as whole numbers, so item2 comes before item10. "By the first number" sorts by the number found in each line. "By length" orders by character count. You can also choose whether capital letters count. Sorting is stable, so equal lines keep their original order.
How to use the Sort Lines Alphabetically
- Paste your lines, one item per line.
- Choose a sort mode.
- Decide whether letter case should matter.
- Copy the sorted list.