ConvertAnyFiles

Sort Text Lines

Put any list in order: names, keywords, URLs, file names or numbers. Natural sorting puts "item2" before "item10", and you can also shuffle, reverse or sort by length.

Free · No sign-up · Files stay on your device

How to use Sort Text Lines

  1. 1Paste your list, one item per line.
  2. 2Choose how to sort and any options.
  3. 3Copy the sorted list.

Features

  • A–Z and Z–A natural sorting
  • Sort by line length
  • Reverse order and random shuffle
  • Optional case-insensitive sorting
  • Remove duplicates and blank lines

Natural vs. plain alphabetical sorting

Plain alphabetical sorting compares character by character, so "item10" comes before "item2". Natural sorting reads numbers as numbers, giving item1, item2, item10, which is usually what people expect.

Frequently asked questions

Does it handle accented letters?

Yes. Sorting follows language rules, so "é" sorts next to "e".

How random is the shuffle?

It uses an unbiased Fisher–Yates shuffle with the browser's secure random number generator.

Can I sort numbers?

Yes. Natural sorting orders numbers by value, including negative numbers at the start of a line.

Related tools