Sort Lines

Free tool to sort lines of text alphabetically, in natural number order, by length, in reverse or at random, with accented letters in the right place, right in your browser.

0Lines

What it does


Sorting lines puts each line of the text in a new order. Alphabetical order follows the rules of the page's language, so accented letters sit next to their plain forms instead of after Z, and with the number option item 2 comes before item 10. You can also sort by length, reverse the current order, or shuffle the lines at random, which is handy for draws and for mixing up a list.

How to use it


  1. Paste or type your text in the box.
  2. Choose the order and whether numbers should be sorted by value.
  3. Copy the result, which updates as you type.

Frequently asked questions


Why does item 10 come before item 2?
Because in plain alphabetical order the text is compared character by character, and 1 comes before 2. Turn on "Sort numbers by value (2 before 10)" and numbers inside the lines are compared as numbers.

Where do accented letters go?
Next to the same letter without the accent, the way a dictionary in that language does it. A plain computer sort would put É and Á after Z, because it compares character codes rather than letters.

Is the shuffle really random?
Yes. It uses your browser's cryptographic random generator and a method in which every possible order is equally likely. Shuffling the same list twice gives different results.

Is my text sent anywhere?
No. Everything happens in your browser, in the page itself. Nothing is sent to our server and nothing is stored, so it is safe to use with private lists and documents.

Wikipedia — Collation
Wikipedia — Natural sort order
Wikipedia — Fisher–Yates shuffle