Remove duplicate lines
Delete repeated lines and keep one copy of each.
Editor
Remove duplicate lines: what it does
Clean a list of emails, keywords or URLs by removing repeated lines in one click. You can also look at the problem from the other side: keep only the lines that occur more than once, or only the lines that occur exactly once.
Remove duplicate lines: how to use it
- Paste your list, one item per line.
- Choose to remove duplicates, keep only duplicates, or keep only unique lines.
- Select Apply and copy the result.
Remove duplicate lines: when to use it
- Deduplicate a mailing list, a list of URLs or a set of keywords merged from several sources.
- Find the entries that appear in two lists by pasting both and keeping only the duplicates.
- Keep only the lines that occur once to spot the odd ones out in a log or an export.
Remove duplicate lines: examples
Input
apple banana apple cherry banana
Result
apple banana cherry
Input
ann@example.com bob@example.com cara@example.com bob@example.com ann@example.com
Result
ann@example.com bob@example.com
Remove duplicate lines: questions and answers
Which copy is kept?
The first one. Later copies of the same line are removed and the order of your list stays the same.
Is the comparison case-sensitive?
Yes. “Apple” and “apple” count as different lines. Use Change case first if you want them treated as the same.
Are lines with different trailing spaces counted as duplicates?
No, the comparison is exact. Run Remove extra spaces first so that spacing differences do not hide duplicates.
Does it tell me how many lines were removed?
Yes. After Apply, the message under the editor shows how many duplicate lines were removed.
Is my text sent to a server?
No. Everything runs in your browser on your own device, so your text never leaves it.
Related tools
Tools people often use together with this one.
- Sort lines
Sort lines A to Z, Z to A, by number or by length.
- Sort words alphabetically
Sort the words of a text from A to Z.
- Remove empty lines
Delete blank lines from your text in one click.
- Extract numbers from text
List every number found in a text, one per line.
- Extract email addresses from text
Pull every email address out of a text, one per line.
- Extract links from text
List every web link found in a text, one per line.
- Reverse text
Flip the text backwards, or reverse words or lines.
- Extract hashtags and mentions
Pull #hashtags and @mentions out of a text.