Word and Text Tools
Word and Text Tools › Clean up and compare text › Sort lines A to Z

Sort lines A to Z

Sorts a list of lines from A to Z.

What it doesSorts a list of lines from A to Z.
Exact ruleBlank lines are dropped; lines are ordered by their lower-case form and then by the exact text, comparing Unicode code points, so the same list gives the same order on every device.
Example textpear ⏎ Apple ⏎ banana ⏎ apple ⏎ Cherry
Example resultApple ⏎ apple ⏎ banana ⏎ Cherry ⏎ pear
LimitsLines are sorted as text, so 10 comes before 2, and accented letters sort after Z in code point order (é after z), unlike some dictionaries.
Where it runsIn your browser: your text is never uploaded, stored or logged.

Related tools

Remove extra spaces Remove line breaks Remove duplicate lines Sort lines Z to A Reverse text Reverse line order Find and replace Text compare (diff)

All tools in Clean up and compare text

How to use the sort lines A to Z

  1. Paste your list, one item a line.
  2. Copy the sorted list.
  3. Use Z to A to reverse the order.

How it works

Blank lines are dropped; lines are ordered by their lower-case form and then by the exact text, comparing Unicode code points, so the same list gives the same order on every device.

Lines are sorted as text, so 10 comes before 2, and accented letters sort after Z in code point order (é after z), unlike some dictionaries.