What this line sorter does
It reorganizes one-line-per-item text using alphabetical, natural, numerical, length or random ordering, with optional trimming and deduplication.
How to use it
- Enter one item per line.
- Choose a mode and locale.
- Set case, trim, empty-line or duplicate options.
- Copy, download or replace the source with the result.
Practical example
Input: item10, item2, item1
Natural output: item1, item2, item10Methodology
Alphabetical and natural modes use Intl.Collator. Numeric mode retains invalid numeric lines after valid numbers. Shuffle uses an in-place Fisher–Yates algorithm.
Common uses and mistakes
- Ordering product or task lists
- Sorting version-like labels naturally
- Sorting numeric exports
- Accidentally trimming meaningful indentation
Limitations
Locale identifiers depend on browser support. Numerical mode accepts JavaScript finite-number syntax and does not parse currency-formatted values. Empty-line positions are not preserved when sorting.