How to use this tool
- Enter one item per line, order.
- Select Update result to view the result.
- Check the method and assumptions below before using the result.
The method, explained
Compare lines using JavaScript string ordering, which compares UTF-16 code units. Ascending keeps lower values first; descending reverses the sorted sequence. Each line is treated as text.
The lines pear, apple and orange sort to apple, orange and pear. Text numbers such as 10 and 2 sort lexically, so 10 appears first in ascending order.
What to keep in mind
Sorting is case-sensitive, not locale-aware dictionary or numeric sorting. Duplicate entries, spaces and blank lines are preserved.
Common questions
Will numbers sort numerically?
No. Each line is text. For example, 10 sorts before 2. Use consistent zero-padding if that suits your list.
Does this remove duplicate entries?
No. Use Duplicate Line Remover when you want to retain only the first occurrence of each exact line.
Methodology maintained by ClarityKit. How these tools are built and checked.