Sort Lines

Put any list in order: alphabetical, numeric, by length or shuffled.

Runs in your browser
Lines
Drop file to load it
EmptySaved locally
Sorted lines
Ready
More options (1)
Try an example:

How to use the Sort Lines

  1. Paste your list into the left panel, one item per line.
  2. Pick an order: alphabetical, natural, by length, reversed or random.
  3. Optionally ignore case, remove duplicates or drop empty lines.
  4. Copy the sorted list or save it as a text file.

Examples

About this tool

Sorting a list by hand is slow and error-prone. Paste it here and choose the order you need. Alphabetical sorting uses your browser's language-aware collation, so accented letters like É and Ø sit next to their plain counterparts instead of being pushed to the end the way a simple computer sort does.

Natural order is what you want for anything with numbers in it: "file 2" comes before "file 10", and "v1.9" before "v1.10". Sorting by length is handy for spotting outliers in a list, and reverse order simply flips the list upside down without sorting it.

The random shuffle uses the browser's cryptographically secure random generator with a Fisher-Yates shuffle, so every order is equally likely. That makes it fair enough for picking raffle winners, splitting people into groups or randomising quiz questions. Press Ctrl/⌘ + Enter to shuffle again.

This tool runs entirely in your browser. What you type or open is never sent to a server.

Frequently asked questions

What is natural sort order?

Natural sorting compares numbers inside text by their value instead of digit by digit. A plain sort puts "item 10" before "item 9" because "1" comes before "9"; natural sort puts them in the order a person would expect.

Is the random shuffle really random?

Yes. It uses crypto.getRandomValues, the browser's secure random source, with an unbiased Fisher-Yates shuffle. Each possible order has the same chance.

How are uppercase and lowercase lines sorted?

With "Ignore upper/lower case" on, "apple" and "Apple" are treated as equal and sorted together. With it off, the sort still groups them closely but places capitals first when everything else is equal.

Does my list leave my computer?

No. Sorting happens entirely in your browser. Nothing is uploaded, and the input is only remembered in this browser's local storage.