Text Tools
Text Sorter
Sort a list of lines. Alphabetical sorting handles accented characters properly — Ångström lands next to Apple rather than after Zebra — and numeric sorting treats the lines as numbers, so 10 comes after 9 rather than before it.
Note
Everything happens in your browser. Nothing you paste is uploaded or stored.
How to use this tool
- Paste your list, one item per line.
- Choose how to sort: alphabetically, by line length, numerically, or shuffled.
- Choose ascending or descending order.
Worked examples
Why numeric sorting exists
- Sorting 9, 10, 100 alphabetically gives 10, 100, 9
- Sorting them numerically gives 9, 10, 100
Alphabetical sorting compares character by character, so '1' sorts before '9'.
Notes and limitations
- Alphabetical sorting uses your browser's language rules, so accented and non-Latin characters are ordered the way a reader expects rather than by their code point.
- Numeric sorting reads the number at the start of each line. Lines that do not begin with a number sink to the bottom rather than being treated as zero.
- Blank lines are removed before sorting.
- Shuffle uses a Fisher-Yates shuffle, so every possible order is equally likely.
- Everything runs in your browser. Your text is never uploaded to a server, which matters when what you are working on is a draft, a client list or anything else you would rather not send anywhere.
Frequently asked questions
Why did my numbers sort in the wrong order?
Alphabetical sorting compares text character by character, so 10 comes before 9 because '1' comes before '9'. Switch to numeric sorting.
How are accented characters sorted?
By your browser's locale rules, which place them where a reader would expect. A raw code-point sort would push every accented word to the end of the list.
Does sorting remove duplicates?
No, the two are separate. Use Remove Duplicate Lines first if you want both.
Related tools
- Remove Duplicate LinesRemove repeated lines from a list, keeping the original order.
- Remove Extra SpacesCollapse repeated spaces and tidy up messy whitespace.
- Text ReverserReverse text by character, word order or line order.
- Word CounterCount words and characters with reading time, as you type.
- Character CounterCount characters against common field and post limits.
- Sentence CounterCount sentences and see the average words per sentence.