How to use Sort lines & remove duplicates
- 1
Paste your list
One item per line — names, keywords, file names, e-mail addresses, numbers or log lines.
- 2
Build the recipe
Add steps such as Sort, Remove duplicates or Filter, set their options and reorder them with the arrows.
- 3
Check the counts
Each step shows how many lines it removed or added, and the result shows the final line count.
- 4
Copy or download
Copy the result, save it as a .txt file, or move it into the input to keep refining.
Limits and Pro
Free and unlimited with no sign-up; lists of 100,000 lines sort, de-duplicate and filter in well under a second on a typical laptop.
Pro removes ads; every step and preset is free. See Pro
About Sort lines & remove duplicates
Lists pasted from spreadsheets, e-mails, log files and survey exports rarely arrive clean: they are out of order, repeat themselves and carry stray spaces and blank lines. This tool fixes them with a short recipe of steps that run from top to bottom, and the result updates the moment you change the list or any step.
Sorting comes in four flavours. A–Z uses your language's dictionary order, so “éclair” sits with the e's. Natural order reads the numbers inside text, putting file2 before file10 the way people expect. Number sorting uses the first number on each line, understands thousands separators like 1,200 and decimals like 2.5, and puts lines without a number at the end. Length sorting orders lines from shortest to longest.
Duplicate removal can keep the first or the last copy, or drop every line that appears more than once, and can treat “Apple” and “apple ” as the same. Other steps trim spaces, remove empty lines, reverse or shuffle the order, keep or drop lines containing a word or matching a regular expression, find and replace, add a prefix, suffix or line numbers, and join lines into one comma-separated string or split one back into lines.
The shuffle uses 128 bits from your browser's cryptographic random generator and stays put while you edit, until you press Reshuffle. Steps can be reordered, switched off without deleting them, or loaded from presets such as “Alphabetize & remove duplicates”. Your list and recipe are remembered, and Use as input lets you start a new round of cleanup from the result.
Privacy
Sorting, filtering and every other step run in this browser tab, so the list you paste is never transmitted. The list and your steps are stored in local storage to survive a refresh; Clear empties the list, and removing the steps resets the recipe.
Features
Four ways to sort
Dictionary A–Z, natural (file2 < file10), by number and by length, ascending or descending.
Smart de-duplication
Keep the first or last copy, or only lines that appear once, ignoring case and spaces if you like.
Chainable steps
Combine trim, filter, replace, number, join and split in any order with live counts.
Fair random shuffle
Fisher–Yates shuffle seeded from the Web Crypto API, stable until you reshuffle.