Sort Lines

Sort a list alphabetically, by number or by length, reverse it or shuffle it at random. Duplicates, empty lines and extra spaces can be removed in the same step.

Sort by

Sorted list 0

iPhone app · Free to downloadLED Marquee - Scrolling TextTurn your iPhone into a scrolling LED sign for concerts, airports and events.View on the App Store

About the Sort Lines

Paste any list – names, keywords, file names, prices – and this tool sorts the lines instantly. Alphabetical sorting follows proper language rules, so accented letters such as é sit next to e instead of after z, and natural number order puts item2 before item10.

Teachers use it to put a class list in order or shuffle presentation slots, writers to alphabetize a glossary or bibliography, and anyone working with spreadsheets to sort a single column without touching the rest of the sheet. Number mode is handy for price lists, scores and inventory counts where the number sits in the middle of the line.

How to use

  1. Paste your list into the box, one item per line.
  2. Choose how to sort: A–Z, Number, Length, Reverse or Shuffle.
  3. Tick options such as descending order, removing duplicates or ignoring case.
  4. Tap Copy to take the result, or Apply to input to keep working on it.

Worked examples

A name list with an accent and a duplicate

Input
Émile
zoe
Aaron
ethan
Olivia
ethan
Result
Aaron → Émile → ethan → ethan → Olivia → zoe (6 lines)
With Remove duplicates: 5 lines

É is sorted with E, and lowercase names are not pushed after capitalized ones, which is what a plain computer sort would do.

A shopping list sorted by price (Number)

Input
Monitor $189.99
USB cable $7.50
Laptop $1,249.00
Mouse $24
Gift card (any amount)
Result
USB cable $7.50 → Mouse $24 → Monitor $189.99 → Laptop $1,249.00 → Gift card (any amount)
Note shown: "1 line without a number was kept at the end."

The first number in each line is read with its thousands separator and decimals, so $1,249.00 counts as 1249. In A–Z mode the same list would be sorted by item name instead.

Numbered files with natural order on and off

Input
chapter10.mp3
chapter2.mp3
chapter1.mp3
Result
On (default): chapter1 → chapter2 → chapter10
Off: chapter1 → chapter10 → chapter2

With natural order off, characters are compared one by one, so "10" comes before "2". Leave it on unless you need to match a strict character-by-character order.

Sort modes

ModeSorted byExample
A–ZDictionary orderapple → banana → cherry
NumberFirst number in each linePear $0.90 → Apple $1,200
LengthNumber of characters (ties A–Z)a → ab → abc
ReverseOpposite of the original order1, 2, 3 → 3, 2, 1
ShuffleCryptographically random orderPicking a speaking order

What is natural sort?

A plain text sort compares character by character, so item10 comes before item2 because 1 is smaller than 2. Natural sort reads runs of digits as whole numbers, giving item1, item2, item10 – the order people expect for file names, chapters and version numbers. Untick Natural number order if you need strict character order.

FAQ

How are numbers like 1,200 or −3.5 handled in Number mode?

The first number in each line is used, with thousands separators, decimals and minus signs understood. Lines without a number go to the end in their original order.

What if a line contains several numbers?

Only the first number counts. "Room 12 – score 87" is sorted by 12, so put the number you want to sort by first, for example "87 – Room 12".

Is the shuffle really random?

Yes. It uses your browser's cryptographic random generator, so every order is equally likely. Tap Shuffle again for a new order.

Can I sort and remove duplicates in one step?

Yes. Tick Remove duplicates; with Ignore case on (the default), "Ethan" and "ethan" count as the same line and the first one is kept. For a count of how often each line appears, use Remove Duplicate Lines.

Is my list uploaded?

No. Sorting happens in your browser. The list is saved only on this device so it is still there next time.