GWN Tools · Text

Text Sorter

Sort lines alphabetically, numerically, or by length — with options to ignore case, remove duplicates, and trim whitespace. Runs entirely in your browser.

 

Empty lines are dropped. Sorting is stable for equal keys.

About the text sorter

What is a text sorter? It reorders a list of lines for you — alphabetically, by number, or by length — and can clean the list by trimming spaces and removing duplicate lines.

How does the text sorter order my lines?

It splits your text into one item per line, then sorts those lines by the mode you pick: alphabetical A-Z or Z-A, numeric ascending or descending, or by length. For example, the lines b, a, c become a, b, c when sorted A-Z.

What do the case, duplicate, and trim options do?

Case-insensitive treats uppercase and lowercase as equal when sorting. Remove duplicates keeps only the first occurrence of each line. Trim removes leading and trailing spaces from every line before sorting.

How does numeric sorting handle non-numbers?

Numeric sorting reads the number at the start of each line and orders by value, so 2 comes before 10. Lines without a number are treated as the lowest value and grouped together.