Text Sorter
Sort lines alphabetically or by number, reverse them, or shuffle them at random.
Runs in your browser — nothing you type is sent anywhere
With this on, item2 comes before item10. Plain alphabetical order puts item10 first, because it compares character by character.
Result
The result appears here as you type. Nothing is sent anywhere — the work happens in this page.
About the Text Sorter
Sorting a list by hand stops being practical somewhere around twenty items, and spreadsheets are a heavy way to alphabetise a few dozen lines pasted from somewhere else. This sorts whatever you paste, one line at a time, as you type.
The option that actually matters is natural number ordering. Sorting as plain text compares character by character, so item10 lands before item2 — because the character 1 comes before 2, regardless of what the whole number means. With natural ordering on, embedded numbers are compared by value and the list comes out item1, item2, item10 as anyone would expect. It is on by default because the alternative surprises people almost every time.
Case sensitivity is off by default, so Apple and apple sort together rather than all capitals sorting before all lowercase. Turn it on when the distinction matters. Blank lines are removed by default, since they are usually accidental.
Reverse and shuffle are included because they are the same shape of task. Reverse flips the existing order without sorting it, which is useful for a list that is already meaningfully ordered. Shuffle randomises, and can be run again for a different arrangement.
How to use the Text Sorter
Paste your lines
One item per line. Names, filenames, tasks, keywords — anything that goes one to a line.
Choose the order
A to Z, Z to A, reverse the existing order, or shuffle at random. Shuffle can be rerun for a different arrangement.
Adjust how it compares
Decide whether numbers should be ordered by value, whether case matters, and whether blank lines should be dropped.
Copy the sorted list
Copy it or download it as a text file. The original stays in the box on the left, unchanged.
Frequently asked questions
Why does item10 come before item2 when sorting?
Does sorting treat capital letters differently?
Can I sort without losing my blank lines?
What is the difference between reverse and Z to A?
Is my list sent anywhere?
You may also need
Remove Duplicate Lines
Strip repeated lines from a list while keeping the original order intact.
Remove Extra Spaces
Clean up double spaces, stray tabs and ragged indentation without wrecking your paragraphs.
Word Counter
Count words, characters, sentences and paragraphs as you type — with reading time.
Case Converter
Switch text between sentence case, title case, camelCase, snake_case and eight more.