Sort lines
Put lines in order — alphabetically, by number, by length, or at random.
9 tools
Tools
Sort Lines
Sort lines alphabetically, by length or by number.
Sort A → Z
Sort lines alphabetically from A to Z.
Sort Z → A
Sort lines in reverse alphabetical order.
Sort by Length
Order lines by how many characters they contain.
Shortest → Longest
Put the shortest lines first.
Longest → Shortest
Put the longest lines first.
Sort Numerically
Sort lines by the first number they contain.
Reverse Lines
Flip the order of lines, last line first.
Shuffle Lines
Put lines in a random order.
Natural ordering
Alphabetical sorting uses natural number order, so “item2” comes before “item10”, and it understands accented letters. Equal lines keep their original order.
Sorting numbers
Sort Numerically looks at the first number on each line — including decimals and negative numbers — so prices, scores and measurements sort by value rather than by their first digit.
Helpful guides
How-to
How to Sort a List Alphabetically
Sort any list in alphabetical order online, in Word, Excel, Google Sheets or on the command line — including natural number order and Z–A.
Related categories
Questions about sort lines
Where do empty lines go?
To the end of the list, or turn on “Remove empty lines” to drop them.
Can I remove duplicates while sorting?
Yes. Every sort tool has a Duplicates option to keep or remove repeated lines.

