Three sort modes, one option toggle
Alphabetical mode (default) uses the browser's `localeCompare` with `numeric: true`, which means `"item 10"` sorts after `"item 2"` the way humans expect (not the raw ASCII string compare that gives `10` before `2`). Case sensitivity is togglable - off (default) treats `Alice` and `alice` as equal for ordering; on distinguishes them via `sensitivity: "case"`.
Numeric mode parses each line as a float (`parseFloat`) and sorts by the resulting number. Parsing is prefix-based: `42 apples` parses as 42 (trailing text ignored). Lines that don't read as a plain number (currency, words, empty) parse as `NaN`; under the spec, `NaN` comparator returns are treated as "equal," so non-numeric lines keep their input-relative position in the output (if every line is non-numeric, you get the input back unchanged). They can also prevent adjacent numeric lines from crossing them, so strip them first if you want a clean numeric-only sort. For mixed alphanumeric input, alphabetical mode with `numeric: true` is usually what you want.
By-length mode sorts by character count, falling back to alphabetical order when two items have the same length. Good for finding the longest or shortest entries. Order flips the direction of whichever mode you chose.
How to use sort a list
- 1Paste your list into the input panel
- 2Pick Mode: Alphabetical (default), Numeric, or By length
- 3Pick Order: ascending (A → Z / low → high) or descending
- 4Toggle Case sensitive if case differences should affect ordering
- 5Output updates live; copy or download the sorted result
Keyboard shortcuts
Drive ListShift without touching the mouse.
What this sorter actually does
Three modes, one case toggle, Unicode-aware comparison.
Alphabetical mode with natural-order numerics
Uses `localeCompare` with `numeric: true`, so `file2` sorts before `file10` (the human expected order). This is the default and the right choice for most lists.
Numeric mode via parseFloat
Each line is parsed as a float; leading digits count and trailing text is ignored (`42 apples` parses as 42). Lines that don't read as a plain number parse as `NaN` and keep their input-relative position (stable sort treats every `NaN` comparison as equal) - strip them first if you want a clean numeric-only result.
By-length mode with alphabetical tiebreak
Sorts by character count. When two items are the same length, alphabetical ordering breaks the tie so the output is stable and predictable.
Case-sensitivity toggle
Off (default) treats `Alice` and `alice` as equal. On uses `sensitivity: "case"` so capitalized items sort distinctly. Only affects alphabetical mode.
Order switch applies to all modes
Ascending is A → Z / low → high / short → long. Descending flips the same ordering. The switch works the same way regardless of mode.
Worked example
Default Alphabetical mode, ascending, case-insensitive. Note the natural-order numerics put `2` before `10`.
Charlie alice 10 2
2 10 alice Charlie
Settings reference
How each option shapes the sorted output.
| Setting | What it does | Effect on the sample |
|---|---|---|
| Mode: Alphabetical (default) | Unicode-aware compare with natural-order numerics | `2`, `10`, `alice`, `Charlie` |
| Mode: Numeric | `parseFloat` each line; non-numeric lines compare as "equal" to everything and keep their input-relative position | Numeric items order as `2`, `10`; non-numeric items (`alice`, `Charlie`) stay roughly where they were in the input. They can prevent a numeric from crossing them, so for a clean number-only result strip non-numeric lines first |
| Mode: By length | Character count ascending; ties broken alphabetically | `2`, `10`, `alice`, `Charlie` |
| Order: Descending | Reverses the ordering for any mode | Alphabetical descending: `Charlie`, `alice`, `10`, `2` |
| Case sensitive: on | Distinguishes uppercase and lowercase in alphabetical mode | Capitalized entries group separately from lowercase |