Skip to content

All tools

Line Sorter

Sort lines alphabetically, by number or length — or reverse and shuffle them.

  • 100% free
  • Natural number sorting
  • Runs in your browser
0 characters

Sort by

Last reviewed by the OnlineToolPro team

What is the Line Sorter?

Sort any list A→Z or Z→A, put numbers in their natural order (2 before 10), sort by length, reverse the order or shuffle it randomly. Handles accents and capital letters sensibly.

How it works

How to use the Line Sorter

3 simple steps. No experience needed.

What can you use it for?

  • Alphabetise names, glossary terms or references.
  • Put numbered items (like “item 2, item 10”) in the right order.
  • Randomise the order of questions or tasks.

Alphabetical vs natural sorting

Plain alphabetical sorting compares text character by character, so “file10” comes before “file2”. The “Numbers in order” option reads numbers by their value instead, giving file1, file2 … file10 — usually what people expect for numbered items, versions and file names.

Other ways to order a list

Sort by length to find the shortest or longest entries, reverse the current order, or shuffle the list randomly. Empty lines can be removed before sorting so they don't collect at the top.

FAQ

Frequently asked questions

What does “Numbers in order” do?

It sorts numbers by value, so “item 2” comes before “item 10” — normal alphabetical sorting would put 10 first.

Is the shuffle truly random?

It uses your browser's secure random generator, so every order is equally likely.

Can I sort a column from Excel?

Yes. Copy the column, paste it here — each cell becomes a line — sort it, then paste the result back.

Other tools you might find useful next.

More Text Tools

Useful tools for writing, editing and analyzing text. 9 free tools.

Browse Text tools