142+ Free Online Tools · Easy. Fast. Accurate.

Sort Lines

Sort the lines of a block of text alphabetically, instantly in your browser.

How to use the Sort Lines

  1. Paste your list, one item per line.
  2. Choose ascending (A to Z) or descending (Z to A).
  3. Tick "Ignore case" so capitalized and lowercase items sort together.
  4. Click Run and copy the sorted list.

How the Sort Lines works

Lines are compared using your browser's locale-aware string comparison, which sorts letters the way a dictionary does, so accented letters sit next to their unaccented forms instead of after Z. With "Ignore case" on, lines are compared in lower case so Banana and apple sort as apple, Banana.

Numbers at the start of lines are compared as text, so 10 comes before 9; pad them with leading zeros if you need numeric order. Combine with Remove Duplicate Lines to get a clean, unique, sorted list.

Frequently asked questions

Is this tool free?
Yes. Sort lines at no cost, with no account required.
Can I sort in reverse order?
Yes. Choose descending order to sort from Z to A.
Does my text leave my browser?
No. The conversion runs entirely in your browser, so your text is never sent to a server.

More Text Tools

Browse all Text Tools →