Text Sorter & Duplicate Remover
Sort lines alphabetically, numerically or by length, remove duplicates and empty lines, and see exactly how many of each were taken out.
What changed
Lines that repeat
Import from File
Drag & drop a file here
or
Supports .txt, .csv, .log, .json and other text files
Sorting and deduplication happen entirely in your browser. Your list is never uploaded, which makes this safe for data you cannot paste elsewhere.
What It Does
Paste a list, get it back in the order you want with the repetition taken out. The sorting covers the orders that actually come up — alphabetical either way, numeric for lists of quantities, by line length, reversed, or shuffled into a random order. Alongside that it can strip duplicate lines, drop blank ones and trim stray whitespace. The part that makes it more than a convenience is the accounting: it tells you how many lines went in, how many came out, and specifically how many were removed as duplicates versus as blanks. When you are cleaning up an export and the count drops by two hundred, knowing whether that was genuine repetition or a column of empty rows is usually the thing you actually needed to find out.
When to Use It
- A CSV export has duplicate rows and you need a clean unique list before importing it somewhere that will reject repeats.
- You have two lists of email addresses that overlap and want to merge them without sending anyone the same message twice.
- A configuration file's entries have drifted out of alphabetical order and you want them tidy so future diffs stay readable.
- You need to know how many genuinely distinct values are in a column, not just how many rows there are.
- You want to randomise a list — for picking a winner, assigning an order, or shuffling test data.
Worked Examples
banana
apple
cherry
apple
banana
Five lines in, three out. Turning on duplicate removal reports exactly two removed, which is the number worth knowing — the shortened list alone would not tell you whether anything unexpected disappeared.
100
9
10
1000
The numeric trap. Sorted alphabetically these come back as 10, 100, 1000, 9 because the comparison is character by character. Switch to numeric sorting and they come back in the order you meant.
Charlie
alpha
bravo
Alpha
A realistically messy paste: inconsistent capitalisation, padding spaces and blank lines. Trimming plus case-insensitive deduplication collapses it to three entries and tells you what it took out.
Features
How to Use
1. Paste your list into the input box, one entry per line. 2. Choose a sort order from the dropdown. 3. Tick the options you want — remove duplicates, drop blank lines, trim whitespace. 4. The result appears immediately with a summary of exactly what changed. 5. Click Copy to take the cleaned list, or Clear to start again.
Common Mistakes
- Sorting numbers alphabetically. It puts 10 before 9 and 1000 before 2, and because the output still looks ordered the error can survive a long way downstream.
- Deduplicating without trimming first. Two lines that differ only by a trailing space are not equal, so the duplicates you can see stay in the list while the tool reports none removed.
- Assuming case-insensitive matching is always right. For email addresses it usually is; for identifiers, hashes or case-sensitive file paths it silently merges entries that were genuinely different.
- Sorting a file where line order carries meaning. Configuration directives, ordered steps and anything with a header row all break when alphabetised.
- Trusting the shorter list without reading the counts. A big drop can mean useful deduplication or a column of blank rows, and those call for very different responses.