Remove Duplicate Lines
Drop the repeats from a list, isolate them, or keep only the lines that occurred once.
What this tool does
Remove Duplicate Lines reads the input one line at a time and decides what survives. One of each line keeps the first occurrence and discards every later repeat. Only the repeated lines throws away the singletons and returns one copy of each value that appeared more than once. Only the lines that appear once does the reverse, deleting anything that was ever repeated. When you keep one of each, the Occurrence to keep dropdown chooses whether the survivor is the first copy or the last, which also moves where it sits in the output.
What counts as the same line is decided by two checkboxes, and both start in the forgiving position. Ignore leading and trailing spaces compares the trimmed line, so an item pushed over by a stray tab still matches its twin. Case sensitive is off, so Apple and apple are one value. Drop blank lines is on as well, so empty and whitespace-only lines are removed before anything is compared. The comparison is only ever used for matching: the line that survives is written out exactly as you typed it, indentation and capitalisation intact.
Matching is done on the whole line. There is no notion of a field or a column, so two rows differing only in a trailing comment are two different values, and deduplicating tabular data by one column is a job for Remove Duplicates instead. Show a count table is on by default and changes what the output pane holds: whichever of the three modes you picked, the moment the input contains a repeat that pane fills with each repeated value against the number of times it was seen, ordered by frequency and capped at 200 rows, and Copy output then copies that table as CSV rather than the surviving lines. Untick it to get the lines themselves back.
The work happens in this browser tab using the page's own JavaScript, so nothing you paste is transmitted or stored, and the tool still runs with the network disconnected. The list is held in memory while it is compared, which makes a very large paste sluggish long before it fails. Output stays in input order unless you tick Sort the result, which sorts case-insensitively and reads digits inside a line as numbers, so item2 lands before item10 rather than after it.
How to use it
- Paste the list. Drop it into the Lines box, one item per line, or press Load sample for a short list that already contains repeats, mixed capitalisation and a blank line.
- Choose what to keep. One of each line for a plain dedupe, Only the repeated lines when you need to report on the duplicates, Only the lines that appear once to isolate the values that occurred a single time.
- Set the matching rules. Decide whether capitalisation and surrounding spaces count, and whether blank lines are dropped. Keeping one of each also lets you pick the first or the last occurrence.
- Read the tally under the output. The hint reports how many lines were compared once any blank ones were dropped, how many came out and how many distinct values were repeated. Copy output puts whatever the pane holds on the clipboard.
Processing & privacy
Runs on your device. Your file is processed directly in this browser.
Common use cases
Cleaning a merged mailing list
Two exports stitched together repeat addresses. With case sensitivity off, [email protected] and [email protected] collapse into a single entry rather than surviving as two.
Reporting on what is duplicated
Switch to Only the repeated lines and the count table names each repeated value and how often it occurred — the answer you need when the duplicates have to be explained rather than deleted.
Comparing two lists for odd ones out
Paste both lists together and choose Only the lines that appear once. Untick Show a count table too, or the pane fills with the tally of what matched instead of the odd ones out.
Tidying a dump of URLs or keywords
Crawl exports and keyword reports repeat the same string dozens of times. Dedupe text first, then tick Sort the result so what is left reads in a sensible order.
Questions
Is my list uploaded anywhere?
Why is the output a table instead of my lines?
Are Apple and apple treated as the same line?
Which copy of a duplicate survives?
Can I deduplicate by a single column?
What happens to blank lines?
Does it change my remaining lines in any way?
Related tools
- Word Counter — Count words, characters, sentences and reading time.
- Case Converter — Switch between upper, lower, title, camel and snake case.
- Remove Line Breaks — Collapse hard wraps back into flowing paragraphs.
- Remove Extra Spaces — Normalise double spaces and stray whitespace.
- Sort Lines — Sort lines alphabetically, numerically or randomly.
- Find and Replace — Bulk replace text with optional regular expressions.