List Sorter Features
- A–Z / Z–A alphabetical sort
- Numeric sort (by number value)
- Sort by string length
- Random shuffle (Fisher-Yates)
- Remove duplicate lines
- Remove empty/blank lines
List Sorter applies the operation you click to the in-place text in the input box. Alphabetical sorts use String.prototype.localeCompare on lowercased copies, so case is ignored and accented characters get sensible ordering. Numeric sort runs each line through parseFloat — handy for mixed lists where each line begins with a number ('42 apples') even if trailing text differs.
Shuffle uses the Fisher–Yates algorithm backed by Math.random — unbiased, but not cryptographically random; for lottery-grade randomness use a tool that taps crypto.getRandomValues. Remove-duplicates pipes the list through new Set(lines), which preserves insertion order in every modern JS engine so the first occurrence of each item is kept. Reverse and Remove-blanks round out the line-level operations.
No. A–Z and Z–A both lowercase each item before comparing with String.prototype.localeCompare, so 'Apple' and 'apple' sort together. localeCompare also gives sensible ordering for accented characters in most browsers.
Each line is run through parseFloat, which extracts the leading number and ignores anything trailing ('42 apples' becomes 42). Lines with no leading number become NaN and end up in implementation-defined positions — strip them first for a clean result.
It uses the Fisher–Yates algorithm with Math.random for the swaps. That is unbiased given a good RNG, but Math.random is not cryptographically secure. For lottery-grade randomness use crypto.getRandomValues.
Yes. It pipes the list through new Set(lines), which keeps insertion order in every modern JS engine, so the first occurrence of each item is kept and later duplicates are dropped.
Explore the full suite of Text tools and 290+ other free utilities at Chunky Munster.