Sort Lines
Sort a list alphabetically, numerically or by length, with duplicate removal and descending order.
Sorted lines appear here. Numeric mode reads the first number on each line, so "item 2" sorts before "item 10".
Computed in this tab as you type.
Saving needs a Dex account. The tool never does.
How it works
- Paste one value per line and choose how to sort: alphabetically, by the first number on each line, or by line length. The result updates as you type.
- Numeric mode reads the first number it finds, so "item 2" sorts before "item 10" instead of after it, which is the mistake a plain alphabetical sort makes.
- Descending, duplicate removal and case sensitivity are separate switches. Sorting uses Intl.Collator, so accented characters sort the way a reader expects rather than by code point.
- Everything runs in the page. Nothing is uploaded and no list is stored.
Examples
Ordering a numbered list
A file listing with names like "chapter 2" and "chapter 10" sorts wrongly as text. Switch to numeric mode and the order follows the numbers.
Finding the longest entries
Sort by length and read from the bottom, or switch to descending. Useful for spotting the one row that will break a fixed-width layout.
Frequently asked questions
Why does "10" come before "9" alphabetically?
Alphabetical order compares characters, and "1" comes before "9". Numeric mode compares the numbers instead, which is usually what a list of quantities wants.
Does sorting remove duplicates?
Only if you turn that switch on. Otherwise every line is kept, and equal values keep their relative order.
How are accented characters handled?
With Intl.Collator, so é sorts next to e rather than after z, which is what a reader expects in an English list.
Is my list uploaded?
No. Sorting happens in the page as you type.