Remove Duplicate Lines
Paste a list of emails, names, part numbers or keywords and each line is left exactly once, in the order it came in. You see how many repeated lines were removed and how many are left. It all happens in your browser: the list never leaves your device.
Works anywhere in the world, wherever you are.
Each line break separates one line from the next.
Duplicate lines removed
0
0 of 0 lines left
- Lines at the start
- 0
- Lines left
- 0
- Empty lines removed
- 0
Result
The order does not change: each line stays where the copy that is kept appeared. Accents count: “papa” and “papá” are different lines.
What you paste never leaves your device: lines are compared in your browser, the text is not in the Share link and it is not saved anywhere. Close or reload the page and it is gone.
Related tools
Sort List
Everyday
A→Z, Z→A, natural order, by length, reversed or shuffled.
OpenCase Converter
Everyday
UPPERCASE, lowercase, sentence case, title case and more.
OpenWord and Character Counter
Everyday
Words, characters, sentences and reading time.
OpenCSV to JSON Converter (and JSON to CSV)
Everyday
Turn a CSV or Excel table into JSON, or JSON into CSV.
OpenAbout this calculator
How to use it
Paste the text in the box, one item per line. The deduplicated result shows up underneath as you type, with the counts. "Copy result" puts it on your clipboard, "Download .txt" saves it as a file and "Reset" clears the text and goes back to the starting options.
When a line repeats, by default its first appearance stays and later ones go. If you would rather keep the last one (say, the latest version of a record), pick "The last". Either way the order of the list does not change: nothing is sorted.
The options
Upper and lower case: with "Match case", "Cat" and "cat" are different lines and both stay. With "Ignore case" they are the same and one stays, spelled as the copy that is kept. Accents always count: "papa" and "papá" are not the same line.
Spaces at the start and end: with "Remove them", "rice" and "rice " (with an invisible trailing space) are the same line, and the result comes out without those spaces. If spacing matters, as in indented code, pick "Keep them".
Empty lines: "Remove" takes out every blank line, "Leave them" does not touch them, and "Keep one" treats them like any other repeated line and keeps only the first.
Letters stored two ways under the hood, such as an ñ made of n plus a combining tilde, compare the same as the ordinary ñ, so they do not show up as different lines just because they came from different programs.
Example
A 9-line grocery list: rice, beans, Rice, jalapeño, "rice " with a trailing space, beans, an empty line, jalapeno and plantains.
With the starting options (match case, remove spaces, leave empty lines) 2 repeated lines are removed, the second "rice" and the second "beans", and 7 are left. Pick "Ignore case" and "Rice" goes too: 3 removed and 6 left. Remove empty lines as well and 5 are left. "jalapeño" and "jalapeno" both stay, because the accent counts.
Your list stays with you
The comparison runs entirely in your browser. The text is not sent to any server, is not in the Share link, is not saved on your device and is not recorded in the site's statistics; the "Share" link only carries the options you picked. Reload or close the page and the text is gone. That matters when the list holds emails or people's names.
Important limitations
- It compares whole lines. Two lines that say the same thing in other words, or with an extra comma, are not duplicates to the tool.
- It does not strip accents when comparing: if your list mixes "Mayagüez" and "Mayaguez", both stay.
- For lists with columns, such as a CSV, it compares the whole row, not one column. To remove duplicates by a single column, use a spreadsheet.
- Very large lists, hundreds of thousands of lines, may take a few seconds on a phone, because everything is processed on the device itself.
Frequently asked questions
This calculation runs in your browser and is never sent to a server. Your last values may be saved on your device only, for convenience. Results are estimates and are not financial, tax, accounting or legal advice.