Sort Lines

Sort a list of lines alphabetically, by length, or numerically, with options for case sensitivity and dropping empty lines. Tidy a list or order numbers.

Sort lines orders a plain list without changing the lines themselves. Alphabetical and length sorting tidy a list, while numeric sorting is what makes a list of numbers or identifiers come out in the right order.

Output

                

Paste or type something above.

Questions about sort lines

Why did my numbers sort as text?
Numeric order is only used when every line is a number, so a line that is not a number makes the list fall back to text order.
Is the sort case sensitive by default?
No, so a and A are treated as the same starting letter, which matches how people read a list.
Does it trim whitespace first?
No, lines are compared as written. Trim them first with the extra spaces remover if they carry stray spaces.