Sort Lines of Text

Paste a list with one item per line and sort lines in the order you need: A to Z, Z to A, natural number order, by length or as a random shuffle. Tick ignore case so capitals do not jump to the top, and remove empty lines to tidy the list. Then copy the sorted result.

Options

Sorting by hand is slow and easy to get wrong once a list goes past a few dozen items. Paste names, keywords, file names or any other list and get it back in order straight away, with each line kept exactly as it was apart from its position.

How to sort lines

  1. Paste your list into the box, one item per line.
  2. Choose A to Z, Z to A, natural order, by length or shuffle.
  3. Tick ignore case or remove empty lines if you need them.
  4. Copy the sorted list.

Natural order vs plain A to Z when you sort lines

A plain alphabetical sort compares text one character at a time, so item10 lands before item2 because the character 1 comes before 2. Natural order reads the numbers as numbers, giving item1, item2, item10, which is what most people expect for file names, chapters and versions.

Turn on ignore case when capitals and lowercase letters should be treated alike, so Zebra and zebra sort together in a normal dictionary-style order. Sort by length puts the shortest lines first, and shuffle gives a random order, handy for picking a winner or mixing a quiz.

Frequently asked questions

Why does 10 come before 2 in my sorted list?

A plain A to Z sort compares characters, not values. Choose natural number order to sort numbers properly.

Does sorting remove duplicate lines?

No. Duplicates are kept. Use the remove duplicate lines tool to keep one copy of each.

Is the shuffle random each time?

Yes. Each shuffle gives a new random order.