MMaxTools

Text Sorter

Sort lines alphabetically, numerically or by length — ascending or descending.

The Text Sorter arranges any list of lines exactly the way you need: alphabetically, by numeric value, or by line length, in ascending or descending order. It is the tool for organizing word lists, cleaning up numbered exports, ranking feature requests or sorting configuration values.

The three sort methods cover the cases plain alphabetical sorting gets wrong: numeric mode extracts the number from each line so 'item 2' sorts before 'item 10' (instead of after, the classic lexicographic trap), and length mode orders lines from shortest to longest — handy for finding overly long log lines or the shortest available domain names.

Options to trim stray spaces and drop empty lines keep results clean. Everything sorts instantly and locally in your browser, with the sorted list one click from your clipboard.

Sort by

Order

How to use the Text Sorter

  1. Paste your lines.
  2. Choose the sort key: alphabetical, numeric value, or length.
  3. Choose ascending or descending.
  4. Toggle trimming and empty-line removal as needed.
  5. Copy the sorted output.

Frequently asked questions

Why does alphabetical sorting put '10' before '2'?

Lexicographic (dictionary) order compares character by character, so '10' sorts before '2' just as 'ab' sorts before 'b'. Numeric mode extracts and compares actual numbers instead, giving the natural 2, 3, 10 order.

What does 'numeric value' mode do with mixed text?

It finds the first number in each line (digits, optional minus and decimal point) and sorts by it; lines without any number sort to the end. 'Item 2 (5kg)' sorts by 2 — use the full line's number placement to predict results.

Does it sort case-sensitively?

The default alphabetical sort is case-insensitive with natural number awareness (like your file manager's name sort). A separate strict byte-order sort is not offered — toggle trimming and duplicates via the related tools if needed.