Text Transform

Word sorter

What to do

Transformed in your browser · nothing is uploaded

Local · numeric sort is a separate option for a reason
Advertisement
320 × 100

Sorts words alphabetically, or lines A–Z, Z–A or numerically, and removes duplicates on request. Comparison ignores case and accents, so Zebra does not jump ahead of apple. Numeric sorting is a separate option because sorted as text, 100 comes before 9.

How to use the word sorter

1 Paste words for the word sort, or one item per line for the line sorts.
2 Pick the sort. Alphabetical, reversed or numeric.
3 Use numeric for a column of numbers; the alphabetical sorts compare character by character.
4 Copy the sorted result.

The alphabetical sort compares base letters rather than character codes, which is what a dictionary does and what most programming languages do not: a plain code-point sort puts every capital ahead of every lowercase letter, giving Zebra, apple, banana. Here case is ignored, so apple comes first. Accents are folded the same way: Émile and Emile compare as equal, and because the sort is stable they keep the order they arrived in.

What it will not do is read numbers inside text. item10 sorts before item2, and version 1.10 before 1.9, because the comparison runs character by character and 1 comes before 2. There is no natural-order option here, so pad the numbers with a leading zero; item02, if they have to sort. The numeric sort is for a column of plain numbers and reads each line from the start, stopping at the first character that cannot be part of a number: 1.234,50 is read as 1.234, and €9 has no numeric value at all and lands wherever it happens to fall. Clean the column before sorting it, or sort it in the spreadsheet it came from.

Questions

Text comparison works character by character, and 1 comes before 9. The numeric option is the fix.

MDN, Intl.Collator
Advertisement
300 × 250
Was this tool any good?
Internal signal only · I use it to find the tools worth rebuilding