Remove duplicate lines
Paste a list with one item per line and get the same list without repeats, in the order each item first appeared.
- Free
- No sign-up
- In your browser
- Original lines
- 0
- Resulting lines
- 0
- Duplicates removed
- 0
How to use this tool
- Paste your list into the top box, one item per line: emails, names, keywords, codes…
- Tick the options you need: ignore case, ignore leading and trailing spaces, remove empty lines or sort alphabetically.
- Check the result and the summary: lines before, lines after and duplicates removed.
- Copy the clean list or download it as a .txt file.
How two lines are judged to be the same
Two lines are considered duplicates when their text is identical, character for character. From each group of repeated lines, the first one is kept in its original position and the rest are removed.
The options only change the comparison, not the text that's kept:
- Ignore case: “London”, “LONDON” and “london” count as the same line. Accents still matter: “café” and “cafe” are different.
- Ignore leading and trailing spaces: “hello” and “ hello ” count as the same. The first one is kept exactly as written.
- Remove empty lines: deletes blank lines or lines containing only spaces. If you leave this unticked, empty lines stay where they are and aren't treated as duplicates, so the spacing between blocks isn't changed.
Sorting the result
With “Sort alphabetically”, the resulting list is sorted from A to Z using your language's alphabetical order: accented letters sort next to their unaccented versions, and numbers inside the text are sorted by value, so “item 2” comes before “item 10”.
If you don't tick this option, the original order is kept, which is useful when position matters, as in a priority list or a log.
Windows, Mac and Linux line breaks
Text copied from Windows uses two characters for each line break (CR and LF), while Linux and macOS use one (LF). The tool normalizes them before comparing, so two identical lines are detected as duplicates even if they come from different systems. The result uses LF line breaks, which any modern editor opens without trouble.
Examples
A mailing list with repeats
Paste the emails, tick “Ignore case” (in practice, email addresses aren't case-sensitive) and you'll get each address once.
Keywords from several sources
Combine several lists, turn on “Ignore spaces” and “Remove empty lines”, and sort the result so it's easy to review.
A log where order matters
Leave “Sort” off: each entry appears once, at the point where it first appeared.
Frequently asked questions
Which line is kept when there are duplicates?
Always the first one in the text, in its original position. Later repeats are removed.
Does it distinguish between words with and without accents?
Yes. “café” and “cafe” are treated as different lines, even with the ignore-case option turned on.
Can I remove duplicate words within a single line?
No, the tool compares whole lines. If you have a comma-separated list, convert it to one item per line first.
Is there a line limit?
There's no fixed limit. Lists of thousands of lines are processed instantly; with huge texts, the time depends on your device.
Is my list sent to a server?
No. Everything happens in your browser and the text isn't sent to any server or stored.
Related tools
This page is also available in: Español, Português, Français
