Sort text lines in multiple ways: alphabetically, numerically, or by line length. Choose ascending or descending order with case sensitivity options.
Saved Presets is a Supporter feature.
Tool History is a Supporter feature.
Tool Notes is a Supporter feature.
Type or paste multiple lines of text to sort.
Select ascending or descending order and case sensitivity.
Copy the sorted lines to your clipboard.
Uses JavaScript's native sort() function with localeCompare() for locale-aware alphabetical ordering. This ensures correct sorting of accented characters (é, ñ, ü) and special letters according to linguistic rules. Case-insensitive mode converts strings to lowercase for comparison while preserving original casing in output.
Numeric mode parses the leading number from each line using parseFloat() and sorts by numeric value. This provides natural ordering where "2" < "10" < "100" (unlike string comparison where "10" < "2"). Lines without leading numbers are treated as having value Infinity and sorted to the end.
Sorts lines by character length (line.length) for organizing text by verbosity. Ascending shows shortest lines first, descending shows longest first. Equal-length lines maintain their original relative order (stable sort).
Supports ascending and descending order via array.reverse() after sorting. The tool handles large texts efficiently (up to 100,000 lines) using JavaScript's optimized Timsort algorithm. All sorting happens instantly in your browser with no server communication.
The tool offers three sorting methods: alphabetical (A-Z or Z-A), numeric (for lines that start with numbers), and by line length (shortest to longest or vice versa).