RunTheTests

Sort Lines

Sort lines of text alphabetically, ascending or descending.

How this calculation works

The tool splits your text into lines and sorts them using locale-aware comparison, so accented characters order sensibly. Pick ascending or descending.

What the results mean

Locale-aware
Accented and non-English letters sort in a natural order rather than by raw code point.

Frequently asked questions

Why does 10 sort before 2?

Because the sort is alphabetical, and as text "1" comes before "2". To sort numbers numerically, zero-pad them (02, 10) so their text order matches their value, or use a dedicated numeric sort.

More in Text