Line-based word sort, three modes
Alphabetical mode uses `localeCompare` with `numeric: true`, so `item2` sorts before `item10` (natural-order) and accents compare the way a human reader expects (`é` near `e`, not stranded after `z`). Case defaults to insensitive; toggle Case sensitive to make `Apple` and `apple` distinct.
Numeric mode treats each line as a float via `parseFloat` - handy for words like `12`, `3.5`, or `-7` mixed into the list. Length mode sorts by `line.length` with alphabetical as the tiebreaker, so two 4-letter words come out alphabetical.
The sort is line-based. A line with `apple orange banana` counts as one 20-character string, not three words - pre-tokenize with Split on whitespace if your input is running prose. Duplicates are kept in input order (stable since ES2019).
How to use sort words in a list
- 1Enter your list of words in the input panel
- 2Select the desired Order from the dropdown
- 3Choose the Mode for sorting
- 4Toggle Case sensitive if needed
- 5Copy the sorted results from the output panel
Keyboard shortcuts
Drive ListShift without touching the mouse.
What Sort List Words Lets You Do
Three sort modes (alphabetical, numeric, length) on line-split input, Unicode-aware by default.
Sort words alphabetically
Arrange words in alphabetical order with ease. Adjust the Order setting to switch between ascending and descending.
Organize words by length
Sort words based on their length, either from shortest to longest or vice versa, using the Mode option.
Handle case sensitivity
Toggle the Case sensitive option to decide if uppercase and lowercase should be treated as distinct.
One word per line required
The op is line-based. A line with `apple orange banana` is treated as a single 3-word string, not three words. Pre-tokenize with Split on whitespace for prose input.
Sort numeric values
If your input is numeric, switch Mode to Numeric for `parseFloat`-based ordering. For shuffle/random order, use Shuffle a list instead.
Worked example
Default Alphabetical mode, A→Z, case-insensitive.
banana apple cherry Date
apple banana cherry Date
Settings Reference
Understand how each option affects the outcome using the example above.
| Setting | What it does | Effect on the sample |
|---|---|---|
| Mode: Alphabetical (default), Order: A→Z | Unicode-aware sort, natural-order numerics | `apple` / `banana` / `cherry` / `Date` |
| Order: Z→A | Reverses direction for any mode | `Date` / `cherry` / `banana` / `apple` |
| Mode: By length | Character count ascending, alphabetical tiebreak | `Date` (4) / `apple` (5) / `banana` (6) / `cherry` (6) |
| Case sensitive: on | Separates uppercase and lowercase | `Date` sorts distinctly from lowercase words |
| Mode: Numeric | `parseFloat` each line; non-numeric lines compare as "equal" to everything and keep their input-relative position | All four words parse as `NaN` → every comparison is treated as equal → stable sort preserves input order: `banana` / `apple` / `cherry` / `Date` |