Back to the blog

Writing

A to Z, with 2 before 10.

Put the lines of a list in A to Z order with numbers in order, by number, by length, upside down or shuffled with a seed, in your browser.

By 3 min read

A text box with a line under it that says 1,204 words, about 5 minutes to read, beside cards for counting, capitals, comparing and tidying.

Sorting a list sounds simple until it puts “item 10” before “item 2”, or “Éclairs” after “zebra”. The sorter uses your browser's own rules for your language, with numbers read as numbers.

A to Z, as people expect.

A to Z uses the browser's collation (Intl.Collator), which knows the alphabet of each language: É sorts with E in English and French, and Ä after Z in Swedish. Numbers inside lines are read as numbers, so item 2 comes before item 10. Capitals do not change the order.

Other orders.

By number sorts by the first number in each line (prices, scores, years), with lines without one last. Shortest first sorts by length. Turn upside down puts the last line first. Shuffle puts the lines in a random order from a seed, so the same list and seed always give the same order: useful for a draw that others can check.

Empty lines and repeats.

Empty lines are taken out when a list is sorted, and the page says how many; under More options they can be kept at the end. Turn on Keep each line once to take out repeats as well.

Nothing leaves your browser.

Everything is worked out on your device: what you paste, type or open is never sent anywhere, and nothing is kept when you leave the page. There are no adverts, no accounts and no limits on length.

Further reading

Topics: sort lines · sort alphabetically · alphabetical order · sort list online · shuffle list · natural sort

A little less theory. A little more doing.

Try it on your own terms, with a free browser tool.

Try the tool