TXT · Text & Data tools

Text Sort & Reorder

Sort by
Order
Input
Output
linessort byazorder1output lines0output chars

Sort lines or words

Choose whether the input should be split into lines or words. Line sorting keeps one output item per line. Word sorting splits on whitespace and joins the result with spaces.

The order menu supports A-Z, Z-A, natural order, reverse order, and random shuffle.

Comparison settings

Case-sensitive sorting treats uppercase and lowercase as different characters. With case sensitivity off, comparison uses base sensitivity so words that differ only by case sort together.

Trim whitespace removes leading and trailing whitespace from each unit before sorting. Turn it off if indentation or leading spaces carry meaning.

Random and reverse modes

Reverse order does not alphabetize first; it reverses the current unit order. Random shuffle produces a new randomized order when the input or settings change.

Frequently Asked Questions

Yes. Choose `Sort by words` to split the input on whitespace and join the sorted words with spaces.

Natural order compares embedded numbers by value, so `item 2` sorts before `item 10`.

No.

Explore Our Tools

Browse all tools