Sort Lines
Sort lines of text alphabetically, numerically, by line length, or in random order with duplicate removal and case options.
Run tool
Organize lists and text blocks quickly with this line-sorting tool. Enter text containing multiple lines to sort entries alphabetically, numerically, by character length, or into random order. The alphabetical mode arranges items from A to Z by default, while case-sensitive sorting treats uppercase and lowercase letters as different. In numeric mode, lines containing numbers are converted to values for proper mathematical ordering, with any non-numeric line assigned a value of zero. You can also organize items by length to place shorter lines first or longer lines first using the reverse order option. If your list contains redundant entries, turn on duplicate removal to keep only the first occurrence of each unique line. The reverse toggle inverts whichever sorting order you select, making it easy to create descending lists or inverse arrangements. Simply paste your lines, adjust the sorting parameters, and view the rearranged list.
Instructions
- Paste or type your newline-separated text into the input area.
- Choose a sorting method such as alphabetical, numeric, length, or random.
- Enable optional toggles to reverse line order, distinguish letter case, or remove duplicate lines.
- Run the tool to view the newly sorted text in the output panel.
Examples
- Sorting an unorganized grocery list (Banana, Apple, Orange) alphabetically produces Apple, Banana, Orange.
- Sorting mixed numbers (10, 2, 100, 25) with numeric mode produces 2, 10, 25, 100 instead of string order.
FAQ
How does numeric sorting handle lines with non-numeric text?
Lines that cannot be parsed into numbers are assigned a numeric value of zero during sorting rather than causing an error.
Does duplicate removal respect letter casing?
By default, duplicate removal is case-insensitive. Enabling case sensitivity ensures lines differing only by uppercase and lowercase characters are retained as distinct entries.
Is the random sorting order predictable?
No. Random mode reshuffles text lines, so each run may yield a different sequence.