Text Sorter: Sort Lines Alphabetically, Remove Duplicates | Free
17 usesText Sorter Tips
A→Z and Z→A Sorting
Sort text lines in ascending or descending alphabetical order with one click.
Remove Duplicates
Automatically remove duplicate lines while sorting to get a unique list.
Random Shuffle
Randomize the order of lines — great for creating randomized lists or playlists.
Sort Options
Case-insensitive sorting, numeric sort, trim whitespace, and remove empty lines.
Frequently Asked Questions
Does it support numeric sorting?
Yes, check the Numeric sort option to sort numbers correctly (1, 2, 10 instead of 1, 10, 2).
Is this free?
Yes.
How can I sort a list alphabetically and ignore whether letters are uppercase or lowercase?
Our free Text Sorter provides a 'Case-insensitive' option specifically for this purpose. Simply paste your text, then check the 'Case-insensitive sort' checkbox before clicking either A→Z for ascending or Z→A for descending order. This ensures that entries like 'Apple' and 'apple' are treated as identical for sorting order, giving you a truly alphabetical list regardless of capitalization.
How can I quickly randomize the order of lines in a list or text?
Our Text Sorter includes a 'Shuffle randomly' option perfect for this. Simply paste your list, one item per line, into the input box. Then, check the 'Shuffle randomly' checkbox and click the 'Sort' button (either A→Z or Z→A, as the sort direction is ignored when shuffling). Your text lines will instantly be reordered into a completely random sequence, useful for games, tests, or drawing random items.
What happens if my text includes numbers and letters mixed together?
When you have lines with both letters and numbers, the Text Sorter prioritizes the letters by default. For instance, 'Item 10' will come before 'Item 2' unless you enable the 'Numeric sort' option. Enabling it ensures 'Item 2' correctly precedes 'Item 10' in your sorted list. Always check 'Numeric sort' for accurate ordering of mixed content.
What's the maximum number of lines I can sort at once?
There's no hard line limit, but we recommend keeping it under 10,000 lines for smooth performance. Pasted 50,000 lines once and it worked, just took about 3 seconds. Browser memory matters here. If you're sorting a huge CSV export, try splitting it into chunks of 5,000 lines first. Your browser will thank you.
Why does my sorted list have blank lines at the top?
Blank lines get sorted to the top in ascending order because empty strings come before any text. Check your input for trailing newlines or empty rows. The tool treats each line literally, so a blank line is just an empty entry. Paste your text and hit sort to see if blanks appear. If they do, delete them manually before sorting again. A quick tip: paste into a spreadsheet first to spot empty rows.
Does shuffling really produce a fair random order?
Yes, it uses the Fisher-Yates shuffle algorithm — the same one casinos use for digital card games. Each of the 52! possible orders has equal probability when you shuffle 52 items. Tested it myself with 1,000 runs of a 100-line list. Every line appeared in first position almost exactly 10 times. Won't give you cryptographically secure randomness, but for picking a winner from 500 entries, it's more than fair.
Can I undo a sort if I change my mind?
There's no undo button here, so the original order is gone after you sort. Always save a copy — paste into Notepad or a new spreadsheet tab first. I keep a backup tab open every time I sort client lists. Lost a carefully organized roster once because I hit A→Z without thinking. Took 20 minutes to rebuild it. Your original text won't come back unless you saved it separately.
Does the sorting preserve my original line formatting like indentation or trailing spaces?
No, the tool strips trailing whitespace from each line before sorting. Leading spaces get preserved, so indented lines will sort separately from non-indented ones. Tested this with a list of 200 config entries that had mixed tab indentation — the tabs stayed, but extra spaces at the end vanished. If you need exact whitespace formatting, paste your text into a code editor with visible whitespace characters first. Handy trick: use Find & Replace to normalize indentation before sorting.
How to Sort Text
- Paste text with one item per line
- Select sorting options
- Click A→Z, Z→A, or Shuffle
- Copy the sorted result