Remove Duplicate Lines
Paste a list from a spreadsheet, a log file, or a pile of email addresses, and the same lines keep showing up twice — or twenty times. Cleaning them by hand is slow and error-prone.
Paste your text and get a clean list with every duplicate removed — in the original order or sorted — with a count of what was dropped.
Unique Lines
How It Works
The tool reads your text line by line and keeps the first occurrence of each distinct line, dropping every later repeat. What counts as "the same line" depends on the options: with case-sensitive matching on, "Apple" and "apple" are different lines and both are kept; with it off, the second is treated as a duplicate of the first. Trimming removes leading and trailing spaces before comparing, so " apple " and "apple" count as the same line.
Order matters too. With "keep original order" on, the surviving lines stay in the order they first appeared — useful for lists where sequence means something. Turn it off and the result is sorted alphabetically, which makes it easy to scan and compare two lists.
Worked Example
Six lines — apple, banana, apple, cherry, banana, date — with the default options give four unique lines (apple, banana, cherry, date) and two removed. Add a line "Apple" with a capital A and it survives as a fifth line, because case-sensitive matching treats it as different from "apple".
How to Use This Tool
Paste your text, set the options, and click Remove Duplicates. The clean list appears below with counts, ready to copy.
- Paste your text. One item per line. It works for email lists, URLs, keywords, names, IDs, or log lines. If your list arrives as one long line, split it into items first with a text separator.
- Set the options. Keep the original order or sort; decide whether case matters; trim spaces and skip blank lines (both on by default).
- Copy the result. The result box shows the unique lines with counts — original lines, unique lines, and how many were removed.
Everything runs in your browser: nothing is uploaded, and there is no practical limit on list size — a list of ten thousand lines dedupes in well under a second.
Tips and Practical Advice
- Trim before you compare. Lists pasted from spreadsheets often carry stray spaces; with trimming on, " apple " and "apple" dedupe correctly. To swap one word for another across the whole list, use find and replace.
- Turn case-sensitivity off for emails and URLs. Email addresses and domains are case-insensitive in practice, so "Alex@Example.com" and "alex@example.com" are the same address.
- Sort when comparing two lists. Dedupe and sort each list, then a side-by-side diff shows exactly which lines differ.
- Keep the original until you are sure. The tool only shows the result — your pasted text stays in the input box, so nothing is lost if you need to re-run with different options.
Cleaning a List Properly: Order, Case and Whitespace
Duplicate lines creep into lists in predictable ways. Two exports from the same system overlap, a list is pasted twice by accident, a spreadsheet column is copied with its header row repeated, or two people maintain the same list and merge their versions. The result is a list that looks longer than it is: the same item appears two, three or ten times, and any count, mail merge or lookup built on it inherits the error. Deduplicating is usually the first step in cleaning a list, before counting, sorting or comparing it with another list.
Three decisions shape the result, and they are worth making deliberately rather than accepting the defaults blindly. The first is order: keeping the first occurrence preserves the sequence the items arrived in, which matters when the list is ranked, chronological or grouped; sorting alphabetically makes the clean list easy to scan and compare. The second is case: with case-sensitive matching, "Apple" and "apple" are different lines, which is right for passwords and codes but wrong for email addresses and domains, where case carries no meaning. The third is whitespace: text pasted from spreadsheets and documents often carries stray leading or trailing spaces, and trimming them before comparing is what lets " apple " and "apple" count as the same line.
Worked example: take twelve lines — apple, Banana, apple, banana, " apple " with spaces around it, cherry, Apple, banana, date, cherry, elderberry, banana. With the default options (case-sensitive, trimming on), the result is seven unique lines — apple, Banana, banana, cherry, Apple, date, elderberry — and five removed. The spaced " apple " is trimmed and dropped as a repeat of "apple", but capital-A "Apple" survives because case-sensitive matching treats it as a different line. Turn case-sensitivity off and the same list gives five unique lines and seven removed, because "Apple", "apple", "banana" and "Banana" now collapse into single entries.
A few habits make deduping reliable. Dedupe before you count: the unique count, not the raw line count, is the real size of the list. Keep the original until the result checks out — this tool leaves your pasted text in the input box, so re-running with different options costs nothing. When two lists need comparing, dedupe and sort both first; a side-by-side diff then shows exactly which lines differ instead of drowning the differences in repeats. And when the list is email addresses, domains or URLs, turn case-sensitivity off: "Alex@Example.com" and "alex@example.com" are the same address, and counting them twice inflates the list and risks double-sending.
Sources: No external data is used on this page — all processing runs in your browser on the text you enter. Last reviewed: 21 November 2026.
Frequently Asked Questions
Does it keep the first or the last duplicate?
The first. With original order kept, the first occurrence of each line survives and later repeats are dropped. That keeps the earliest position of every item.
Are Apple and apple treated as the same line?
Only if you turn case-sensitivity off. By default it is on, so Apple and apple are different lines and both survive. Turn it off for emails, domains and other case-insensitive data.
What happens to blank lines?
By default they are skipped — empty lines never appear in the result. Untick 'Skip empty lines' if you want one blank line kept where blanks occurred.
Is there a limit on how many lines I can paste?
No practical one. Everything runs in your browser, and a list of ten thousand lines dedupes in well under a second.
Can I remove duplicates from a comma-separated list?
Not directly — this tool works line by line, so each item must be on its own line. Convert the commas to line breaks first (a text separator does exactly that), paste the result here, and dedupe as usual.
Does deduping change the text I pasted?
No. Your pasted text stays untouched in the input box — the tool only shows the cleaned list in the result box below. Nothing is uploaded or saved, so you can re-run with different options as often as you like.
Last updated: