Text Sorter
Sort lines of text alphabetically, numerically, by length, or randomly. Options to remove duplicates and ignore case.
About Text Sorter
Sorting lines is one of those small operations you reach for constantly when working with text โ sorting a list of names alphabetically, ordering imports in a code file, organizing a CSV column, or putting a brainstorming list into a coherent order. This text sorter handles all the common sort modes: alphabetical A-Z and Z-A, numerical ascending and descending, by line length, randomized order, and case-sensitive or insensitive variants.
It correctly handles natural number sorting (so item-2 comes before item-10), preserves whitespace where it matters, and includes an option to deduplicate while sorting. Useful for organizing reference lists, sorting product SKUs, reordering CSV data, and quickly randomizing a list to break alphabetical bias in surveys or sampling.
How to Use
Paste your text (one item per line) into the input box.
Choose a sort mode: alphabetical, numerical, by length, random, or reverse.
Set options like case sensitivity and duplicate removal.
Click 'Sort' and copy the result.
Frequently Asked Questions
How does numerical sorting work?
Lines are sorted by the number at the beginning of each line. Lines without a number are treated as 0. This is useful for sorting numbered lists or data.
Can I remove duplicates while sorting?
Yes! Check the 'Remove duplicates' option to automatically deduplicate lines during sorting.
What is the random shuffle?
Random shuffle uses the Fisher-Yates algorithm to randomize the order of all lines. Each shuffle produces a different result.

Text Sorter Online: Sort Lines Alphabetically, Numerically & More
Sorting a list manually is mind-numbing. Our text sorter handles 8 sort modes โ alphabetical, numerical, length, random โ and works on any text instantly.
Read the full guide