Sort lines is a text tool that reorders a list of lines using one of several modes. It supports alphabetical (ascending or descending), by length, and random shuffle, plus options to deduplicate, trim whitespace, and remove empty lines. The tool runs in your browser.
Input
Sorted output
SORT OPTIONS
Mode-specific and use-case sort tools.
Array.prototype.sort with a locale-aware comparator (Intl.Collator). Shuffle mode uses the Fisher-Yates algorithm with Math.random().Array.prototype.sort and Intl.Collator; no external library.Math.random() is not cryptographically secure but is sufficient for visual shuffling.Reviewed and tested May 25, 2026.