Sorts lines with a natural ordering by default, which is the one people actually mean: item9 before item10, not after it.
Natural versus alphabetical
item10 sorts before item9 because 1 comes before 9. That is correct and it is never what anyone wants.
Natural sort reads runs of digits as numbers, giving item1, item2, item9, item10. This is what file managers do, and it is the default here. Use Numeric value instead when every line is a number and you want them compared as such — it also handles negatives and decimals correctly.
Case sensitivity
Apple and apple sort together. Turn it on for a case-sensitive sort, which puts every capitalised line before every lowercase one — occasionally what you want for code, rarely for anything else.Sorting is not one operation once accents are involved
z — so Zoe, apple, Ather is a correct code-point sort and a useless list. The alphabetical option uses your browser's locale-aware comparison instead, which is why a and ather sort together in English but not in Swedish, where a is its own letter at the end of the alphabet. If you need a result that is identical on every machine, code-point order is the one that never varies.Other names for this
Also searched as “alphabetize lines”, “sort text online”, “line sorter”.
Questions
- Why did item10 end up after item9?
- That is natural sort doing its job. Digit runs are compared as numbers rather than character by character.
- Can I sort and deduplicate in one pass?
- Yes — tick “Remove duplicates”. The count removed is reported.
- Does my text leave the browser?
- No. Everything runs as JavaScript in this tab — there is no server involved and no request is made. Open the Network panel and watch, or turn your Wi-Fi off and keep using the tool.