Text Line Sorter
Sort lines alphabetically, by length, numerically, or shuffle them randomly. Remove duplicates and trim whitespace in one click.
How to Use
Paste Your List
Type or paste text in the input box, one item per line. Any kind of list works — words, names, URLs, or numbers.
Choose Sort Mode
Click A→Z, Z→A, Shortest, Longest, Shuffle, Reverse, or a numeric mode to set how your lines will be ordered.
Set Options
Toggle case-insensitive sorting, deduplication, whitespace trimming, or symbol-ignoring as needed, then click Sort Lines.
Copy or Download
Use the toolbar to copy the sorted result to your clipboard, save it as a .txt file, or swap it back to the input for further sorting.
Frequently Asked Questions
Yes. Use the "1→9" or "9→1" modes for numerical sorting. Lines that are not numbers fall back to alphabetical order.
It strips any non-alphanumeric characters from the start of each line before comparing, so items like "- Apple" and "Apple" sort together correctly.
Yes. Enable the "Remove duplicates" checkbox and duplicates will be removed from the sorted output (case-insensitive if that option is also on).
Yes. Swap replaces the input with the sorted output so you can chain sorts. Your original is not saved, so copy it first if needed.
There is no hard limit, but very large lists (10,000+ lines) may take a moment to process depending on your device.