How to remove duplicate lines from a list
- Paste your list into Input lines, one item per line.
- Keep Remove duplicates checked and choose whether matching should be case-insensitive.
- Pick a sort order, such as A → Z, Natural or Shuffle, and add an optional prefix or suffix.
- Copy the result, download it as a .txt file, or click Use as input to keep refining.
What you can do with Remove Duplicates & Sort Lines
- Dedupe in one step
- Removes repeated lines while keeping the first occurrence, and tells you exactly how many duplicates were dropped.
- Eight sort orders
- Keep the original order, sort A to Z or Z to A, use natural sort, shortest or longest first, reverse the list or shuffle it.
- Natural sorting
- Natural mode puts item 2 before item 10, the way people expect numbered file names, chapters and versions to be ordered.
- Cleanup options
- Trim leading and trailing spaces and delete empty lines so stray whitespace doesn't hide duplicates or leave gaps in your list.
- Prefix, suffix and numbering
- Add text before or after every line, such as quotes and commas for a code array, or number each line automatically.
- Random shuffle
- Shuffle uses the browser's cryptographic random number generator, which suits drawing raffle winners or randomizing a running order.
Deduplicating and sorting lists the right way
Cleaning a list is one of the most common text chores: merging email lists, tidying keyword research, deduplicating product SKUs, or preparing a column of values before pasting it into a spreadsheet or SQL query. With Trim whitespace and Case-insensitive turned on, entries like Apple, apple and apple with a trailing space are treated as the same item, which catches the duplicates that exact matching misses. The counter above the result shows how many lines went in, how many came out and how many duplicates were removed.
Alphabetical sorting uses your browser's locale-aware collation, so accented letters sort next to their base letters instead of at the end, and upper and lower case mix naturally rather than all capitals coming first. Natural sort goes a step further and compares numbers by value, which keeps chapter 9 ahead of chapter 10. A useful trick for developers: set the prefix to a quote and the suffix to a quote followed by a comma to turn a plain list into array items in seconds.
Frequently asked questions
Is my list kept private?
Yes. All sorting and deduplication runs in your browser, and the list is never uploaded. That makes it safe for email addresses, customer names and other personal data. Nothing is stored after you close the tab.
Which duplicate is kept?
The first occurrence of each line is kept and later repeats are removed. If you also choose a sort order, deduplication happens first and the remaining unique lines are then sorted, so the result never contains the same entry twice.
Can I remove duplicates but keep the original order?
Yes. Leave Sort set to Keep order and keep Remove duplicates checked. The unique lines stay in the order they first appeared in your list, which is useful for logs, rankings and anything where sequence matters.
How many lines can it handle?
Lists with tens of thousands of lines are processed almost instantly on a modern computer. Much larger lists also work, limited only by your device's memory and browser, since nothing is sent to a server for processing.
Can I use it to pick a random winner?
Yes. Paste the names, choose Shuffle and take the first line as your random pick. Reshuffle gives a new order each time. The shuffle draws from the browser's cryptographic random number generator rather than a predictable one.