Sort any list in seconds
Lists rarely arrive in the order you need: names from a sign-up form, keywords from a report, file names, tags, product codes or a reading list typed over months. This tool sorts text line by line. Paste the list, pick how to sort it and copy the result. Each line is kept exactly as you wrote it, only its position changes.
Every sort mode with an example
Here is what each mode does with a small list.
- Alphabetical, A to Z: pear, Apple, banana becomes Apple, banana, pear. Z to A gives the opposite order. Capital letters are ignored unless Case sensitive is on.
- Natural sort: numbers inside text are read as numbers, so item10, item2, Item1 becomes Item1, item2, item10. Without it you get Item1, item10, item2, the order computers use when they compare characters. Natural sort works well for file names, chapters, versions and invoice numbers.
- Length: strawberry, fig, kiwi becomes fig, kiwi, strawberry, shortest first. Lines of the same length are sorted alphabetically. Handy for finding very long titles or short codes.
- Number value: the first number in each line counts. Room 12, Room 3, Hall 100 becomes Room 3, Room 12, Hall 100. Prices, scores and measurements sort correctly, and lines without a number go last.
- Reverse order: no sorting at all, the list is simply flipped, so the last line comes first. Useful for logs, timelines and lists that were pasted upside down.
- Shuffle: puts the lines in a random order, for raffles, quiz questions, playlists or picking who goes first.
Options that clean up the list
- Ignore "the", "a" and "an": sorts The Beatles under B, the way libraries and music apps sort titles and band names.
- Case sensitive: treats Apple and apple as different lines. Off by default, which is what most people expect when they sort a list of words.
- Trim spaces: removes spaces and tabs at the start and end of each line, which often sneak in when you copy from a spreadsheet or a web page and push lines to the top of the list.
- Remove empty lines and Remove duplicates: drop blank lines and keep only the first copy of each line. For more control over duplicates, use the duplicate line remover.
How to use the line sorter
- 1Paste your text into the left box, one item per line, or press Example to try a sample list.
- 2Choose how to sort: alphabetically, by length, by number value, in reverse order or shuffled, and pick the direction.
- 3Set the options, check the line counts, then copy the sorted list or download it as a .txt file.
Frequently asked questions
Why does item10 come before item2 in other tools?
A plain alphabetical sort compares text one character at a time, and the character 1 comes before 2, so item10 lands before item2. Natural sort reads the digits as a number instead, so item2 comes before item10. Natural sort is on by default here; turn it off if you need the strict character order.
What does Case sensitive change?
With Case sensitive off, capital letters are ignored, so "apple" and "Apple" sort as the same word and stay in the order you pasted them. With it on, they count as different: Apple sorts right before apple, and Remove duplicates keeps both.
How does sorting by number value work?
The tool finds the first number in each line, like 12 in "Room 12" or 1,250.50 in "Rent $1,250.50", and sorts by its value. Negative numbers and decimals work. Lines without any number go to the end of the list in alphabetical order.
Is the shuffle really random?
Yes. It uses the Fisher-Yates shuffle with random numbers from your browser's cryptographic generator, so every order is equally likely. Press Shuffle again for a new order, for example to draw names or mix up quiz questions.
Is my list uploaded anywhere?
No. Sorting happens in your browser as you type. Nothing is sent to a server or stored, so you can sort customer lists, emails or private notes safely.