Sort Lines
Alphabetical, with numbers in the right order.
Alphabetical, with numbers in the right order.
How to use it
- Paste your list. One item per line. Blank lines are kept and sort to the top.
- Pick the direction. A to Z or the reverse. Numbers embedded in the text are ordered as numbers by default.
- Copy the result. Nothing is stored, and nothing was sent anywhere to do it.
When you would use this
Sorting a list sounds like it has one obvious answer and has at least three. A plain sort compares text character by character, which puts every capital letter before every lowercase one and orders item10 ahead of item2 because the character 1 comes before 2. Neither result is wrong exactly, but neither is what anyone means when they ask for a sorted list. This uses a locale aware comparison that treats runs of digits as numbers and does not care about case, so version9 precedes version10 and Apple sits next to apple. If you specifically need the byte order, because you are comparing against something a program produced, the numbers option turns it off. Blank lines are kept rather than dropped, since removing them is a separate decision and there is a separate tool for it.
Questions
- Why is item2 before item10?
- Because that is almost always what people want. A plain text sort compares character by character, so 1 beats 2 and item10 lands first. Turn off the numbers option to get that behaviour.
- Is the sort case sensitive?
- No. Apple and apple sort together rather than all capitals coming first, which is what a plain byte sort does and what surprises people.
- Is my list sent anywhere?
- No. The work happens in the page. There is no server here, which is also why it keeps going with the network disconnected.