⌕
Text · free online tool

Text Sorter.

Sort lines in alphabetical or reverse order.

Your workspace◈ Processed on your device
Your result
Your result will appear here.

A little context.

Sorts lines using English locale comparison with numeric awareness. Blank lines are retained and identical lines are not removed.

Putting numbered labels into readable order

Use the sorter for a list such as item1, item2 and item10. Numeric-aware comparison keeps item2 before item10 rather than sorting only by individual character codes. Choose the descending mode to reverse the sorted list.

Interpreting the result and avoiding mistakes

Sorting retains duplicates and blank lines. English locale comparison is not a byte-order comparison or a language-specific dictionary rule for every locale. If order encodes priority, make a copy before sorting.

A reproducible workspace example

These are the starting values in the form above. The result below is calculated from these values when the page is built, using the same processing engine as the tool.

Lines
pear
apple
Banana
Order
A to Z

Calculated output

apple
Banana
pear

Quick reference

item2 sorts before item10

How to use this tool

  1. Enter lines, order in the workspace above.
  2. Select Run tool to process your input. Invalid values produce a message next to the form.
  3. Copy the result or download it as a file. Reset example restores the original input.

Keep a good thing going.

A few related tools for your next step.