Skip to content
KJPOkjpo

Text Sorter

Paste a list to sort its lines A to Z, Z to A, by number or by length, reverse their order, or shuffle them into a random order.

Text Sorter

Sort lines alphabetically or numerically, by length, in reverse, or shuffle them.

Options

Type or paste a list to sort its lines.

Your text is processed in your browser and is not uploaded.

How it works

  • Type or paste one item per line, then choose a sort order. The result updates as you type.
  • Turn “Ignore case” and “Natural number order” on or off, and optionally remove blank lines.
  • Press Shuffle for a random order; each press gives a new one. Changing any option returns to the chosen sort.

Counting rules

  • Natural number order puts “file2” before “file10”; with it off, text is compared character by character.
  • Number sorts use the number at the start of each line, and lines without one go last in their original order.
  • Length sorts count visible characters, so an emoji counts once. Lines of equal length keep their original order.
  • With “Ignore case” on, “a” and “A” count as equal and keep their original order; off, lowercase comes first.
  • Blank lines sort first in A to Z and last in Z to A unless removed. A trailing line break at the end is ignored.
  • Your text is processed in your browser and is not uploaded.

Worked example: The lines banana, Apple, cherry sort A to Z as Apple, banana, cherry.

More text tools