Remove Duplicate Lines

Remove repeated lines from a list, or find which lines are repeated and how many times.

How it works

Paste a list with one item per line. "Remove duplicates" keeps the first copy of each line and drops the rest, in the original order. "Show only the repeated lines" lists the lines that appear more than once, and "Count each line" gives a frequency table.

Choose what counts as the same: ignoring capital letters, ignoring spaces at the ends, or treating several spaces as one. Empty lines can be dropped too.

Worked example

The list "Delhi, delhi, Mumbai, Delhi " (one per line) with case ignored and trimming on becomes "Delhi, Mumbai". Count each line shows Delhi 3, Mumbai 1.

Good to know

Common questions

Does it keep the original order?
Yes, the first appearance of each line stays where it was.
Is it case sensitive?
Not by default. Tick "Case sensitive" to treat Apple and apple as different.
How many lines can it handle?
Hundreds of thousands in a modern browser.
Can I find items in both of two lists?
Yes, paste both lists together and choose "Show only the repeated lines".

More in Text.