Skip to content
YouNeed Tools
Free VPN

Remove Duplicate Lines

Paste a list and every repeated line disappears, leaving one copy of each in its place. You choose whether capitals and spaces count.

Which copy to keep
Spaces

3 duplicates removed. 8 lines in, 5 lines out.

Lines that were repeated (3)

Cleaned on your device. Your list isn’t sent anywhere.

Worked example: a shopping list typed by two people

The list has seven lines: Milk, eggs, Bread, milk, “ Eggs ” (with spaces), Butter and bread. With the default settings (capitals ignored, spaces at the ends ignored) the result is Milk, eggs, Bread, Butter: 3 duplicates removed, and each item keeps the spelling it had the first time. With “Capitals matter” ticked and spaces counted, nothing matches exactly, so no lines are removed. Choosing “Last copy” instead gives milk, Eggs, Butter, bread, because each item moves to where it last appeared.

How lines are compared

  • Capitals: ignored unless you tick the box. Letters with accents are compared as they are, so “café” and “cafe” stay separate.
  • Spaces: “Ignore at ends” trims spaces and tabs at the start and end of each line, the usual leftovers from copying out of spreadsheets. “Ignore extra” also treats several spaces inside a line as one.
  • Blank lines are never treated as duplicates of each other; they are kept where they are unless you choose to remove them.
  • The kept line is always written exactly as it was, even when capitals or spaces were ignored to compare it.

Where duplicate lines come from

Joining two exports, pasting from several pages of results, or merging sign-up sheets from different events all repeat entries. Duplicates cause double e-mails to the same customer, inflated counts in reports and wasted rows in imports. The list of repeated lines under the result shows which items appeared more than once and how many times, which is often the first thing you want to know about a messy list.

Tips for clean lists

For long lists, sort them first with the line sorter so near-duplicates such as “Acme Inc” and “Acme Inc.” sit next to each other, then fix them by hand. For lists of names or e-mail addresses in a CSV file, keep only the column you need before pasting, because a line only counts as a duplicate when the whole line matches. Use find and replace to remove trailing full stops or “www.” before you remove duplicates.

Common jobs it does in seconds

  • Mailing lists: merge sign-ups from a website form, a shop and an event, then remove the addresses that appear twice before importing them into your e-mail service, so nobody gets the newsletter twice.
  • Keyword research: combine keyword exports from several tools and keep each phrase once, with capitals ignored.
  • Log files: collapse repeated warning lines to see which different messages a program actually wrote, and how often each one appeared.
  • Inventory and SKU lists: find product codes that were entered twice before a stock count.
  • Guest and attendee lists: spot people who registered more than once, using the list of repeated lines.

Because only whole lines are compared, the order of the remaining lines never changes: the result is your list with the extra copies taken out, not a re-sorted list.

Related tools

Sources

Checked on November 26, 2026:

Frequently asked questions

How do I remove duplicate lines from a list?
Paste the list with one item per line, choose whether capitals and spaces should count, and copy the result. Each repeated line is kept once, in its original place, and the tool tells you how many copies it removed.
Does it treat “Apple” and “apple” as the same?
By default, yes: capitals are ignored when lines are compared, and the copy that stays is written exactly as you typed it. Tick “Capitals matter” to keep both.
What is the difference between keeping the first and the last copy?
Keeping the first copy leaves each item where it first appeared. Keeping the last copy moves it to where it last appeared, which is useful for logs and exports where the newest entry is at the bottom.
Can I remove duplicate e-mail addresses?
Yes. Paste one address per line. Leave capitals ignored, because e-mail providers treat [email protected] and [email protected] as the same mailbox in practice.
How do I remove duplicates in Excel instead?
In Excel, select the column and use Data › Remove Duplicates; in Google Sheets, Data › Data clean-up › Remove duplicates. This tool is quicker for a pasted list and shows which lines were repeated.
Is my list uploaded?
No. The list is processed on your device and isn’t sent anywhere.

Last updated: 2026-11-26