Text sort
One per line, reordered the way you choose.
Chinese ordering is delegated to the browser's built-in localeCompare('zh-Hans-CN'), which in practice yields pinyin order (阿 < 波 < 李 < 钱 < 王). It is not a full dictionary collation: polyphonic and rare characters, and different browser versions, can produce different orders. For a fixed order use LC_ALL=C sort on the command line, or compare by Unicode code point.
When to use it
- A keyword or domain list has to be alphabetised before it goes into a spreadsheet, and some rows carry numbers (file2, file10) that should sort by value rather than character by character.
- You merged several lists, removed duplicates and now want the shortest entries first for a tag cloud or glossary.
When not to
- You need strict Chinese ordering by pinyin or stroke count (name lists, glossaries): the order here depends on the browser's collation data, does not guarantee pinyin, and offers no stroke or radical option.
- You need to sort by one column of a TSV/CSV: comparison is on the whole line and columns are not parsed — use sort -t or a spreadsheet.
Sorting, deduplication and shuffling all run in your browser; nothing is uploaded. Limits: whole lines only, blank lines dropped; alphabetical order depends on the browser's collation data and can differ between browsers; dedup is case-sensitive and does not trim; shuffling uses Math.random, so it is not suitable for draws or anything that must be provably fair.
Frequently asked
Is Chinese sorted by pinyin?
Sorting is delegated to the browser's localeCompare with the zh-Hans-CN locale. Chrome, Safari and Firefox each rely on their own ICU data, and in practice Han characters come out in roughly pinyin order, but the page ships no pinyin dictionary, so polyphonic characters, rare characters and different browser versions can disagree. For one fixed order, sort on the command line (LC_ALL=C gives byte order) or compare code points in a script.
Why does file2 come before file10?
The alphabetical mode passes numeric:true, so runs of digits compare by value and file2 sorts before file10. Plain character comparison gives the opposite ('1' before '2'). There is no switch to turn natural ordering off; zero-pad the numbers (file02, file10) if you need byte order.
I ticked deduplicate — why are Apple and apple both still there?
Deduplication is an exact Set comparison: case-sensitive and without trimming. Only the sort comparison ignores case (sensitivity: 'base'). Both lines survive and simply end up next to each other. For case-insensitive dedup, run the Remove Duplicates tool with ‘ignore case’ first, then sort here.