What is a line sorter?
A line sorter rearranges a list so each entry is in order. It saves time when you're alphabetising names for a class register, ordering a glossary, arranging references, ranking keywords by length or reversing a log so the newest entry is first.
This sorter offers natural alphabetical order in both directions, sorting by line length, sorting by the number each line starts with, reversing the current order and a fair random shuffle. Removing duplicates and empty lines can happen in the same pass, so a messy pasted list comes out clean and ordered at once.
How to sort a list alphabetically
1.Paste the lines
Any list with one entry per line.
2.Pick the order
Alphabetical, reverse, shortest or longest first, by the number at the start, reversed or shuffled.
3.Tidy as you sort
Optionally remove duplicates and blank lines in the same step, then copy the result.
Example: mixed names and numbered items
Lines: item 10, item 2, Item 1, zebra, apple, item 2, Mango. Sorted A to Z (natural):
- 1–2
- apple, Item 1
- 3–5
- item 2, item 2, item 10
- 6–7
- Mango, zebra
- With Remove duplicates
- 6 lines, one item 2
Item 1, item 2 and item 10 come out in numeric order, not the 1, 10, 2 a basic sort produces.
Natural order, so 2 comes before 10
Plain computer sorting compares character by character, which puts "item 10" before "item 2". This sorter uses natural ordering, reading runs of digits as numbers, so chapters, file names and versions line up the way a person would expect.
By default capitals are ignored, so "apple" and "Apple" sit together. Tick Capitals before lower case for strict ordering. Shuffle uses your browser's cryptographic random generator, so every order is equally likely.
Frequently asked questions
Why did item 10 come after item 2?
That's natural sorting: numbers inside text are compared by value, not digit by digit.
Can I sort a list of numbers?
Yes. Choose By leading number to sort by the number at the start of each line, including decimals, negatives and thousands separators.
How do I randomise a list?
Choose Shuffle randomly. Change any setting or choose it again to get a new order.
Does it handle accented letters?
Yes. Letters like é and ü sort next to e and u, following standard English collation.
Related tools
Remove Duplicate Lines
Delete repeated lines from a list and keep the first of each.
Reverse Text Generator
Mirror text backwards, reverse word order, letters in words, or line order.
Name Picker Wheel
Spin a wheel of names to pick a random winner fairly.
Word Counter
Words, characters, sentences, paragraphs and reading time.
Character Counter
Characters against X, Instagram, SMS and SEO limits.
Case Converter
UPPER, lower, Title, Sentence, camelCase, snake_case and more.
More Utilities tools
Dates & time
Percent & price
Unit converters
Text tools
Random & games
Generators
Share & collaborate
Maths
- Ratio calculator
- Average calculator
- Weighted average calculator
- Standard deviation calculator
- Percentile calculator
- Fraction calculator
- GCD and LCM calculator
- Prime number checker
- Quadratic equation solver
- Golden ratio calculator
- Roman numeral converter
- Number to words
- Number base converter
- Scientific calculator
- Factorial calculator
- Exponent calculator
- Logarithm calculator
- Modulo calculator