Text Sorter
Sort lines A to Z, Z to A, by length, numerically or randomly.
Sort any list instantly
The Text Sorter arranges lines of text in the order you need. Paste a list of names, products, keywords, URLs or numbers and sort it alphabetically from A to Z or Z to A, by line length, numerically, or shuffle it into random order. It is much faster than opening a spreadsheet just to alphabetize a short list.
How to sort text
- Paste your list with one item per line.
- Pick a sort method from the menu.
- Optionally turn on case sensitive sorting or remove empty lines.
- Click Sort and copy the result.
Sort methods
- Alphabetical A to Z uses natural ordering, so “Item 2” comes before “Item 10”.
- Alphabetical Z to A reverses that order.
- Numeric reads the first number in each line, perfect for prices, scores and IDs.
- By length places the shortest or longest lines first, which is handy for finding long titles.
- Reverse order flips the list upside down without sorting.
- Random shuffle mixes the list fairly, useful for prize draws, quizzes and picking teams.
Natural sorting explained
Basic computer sorting puts “10” before “2” because it compares one character at a time. Natural sorting understands numbers inside text, so file names, chapter titles and model numbers appear in the order a person would expect. Our sorter uses natural sorting by default and supports accented letters in many languages.
All sorting is done privately in your browser, so you can safely sort internal data, and it works the same on phone, tablet and desktop.
Frequently asked questions
Is the random shuffle truly random?
It uses the Fisher-Yates shuffle with your browser's random number generator, which gives every possible order an equal chance.
Can I sort by a number in the middle of a line?
Numeric sort uses the first number found anywhere in each line, so "Order 25 - Smith" is sorted by 25.
Does sorting change my original text?
No. The sorted list appears in a separate result box, so your original input stays as you pasted it.