Remove Duplicate Lines

Writing Tools

Paste a list and keep only the first occurrence of each line, with the duplicates counted.

Options
Lines
Result

Processed in your browser. A copy of each run is saved to your past runs so you can reopen it. Privacy

About

What the Remove Duplicate Lines does

Remove Duplicate Lines keeps the first occurrence of every line in a list and drops the repeats, updating as you type. Matching can ignore case and extra spaces, blank lines can be dropped, and the result can keep its original order or be sorted. For CSV data, the header row stays on top and rows can be compared on chosen columns, such as email only.

Steps

How to use it

  1. 1Paste the list, or upload a .txt or .csv file.
  2. 2Choose whether case and extra spaces count as differences.
  3. 3Read the unique lines on the right, or switch Show to see what was removed.
  4. 4Copy or download the result.

Example

A real run

Input

ada@example.com
grace@example.com
Ada@Example.com
katherine@example.com
GRACE@example.com
alan@example.com
Katherine@Example.com

Output

ada@example.com
grace@example.com
katherine@example.com
alan@example.com

Removed 3 duplicates · 4 unique lines of 7

With case-insensitive matching, Ada@Example.com, GRACE@example.com and Katherine@Example.com are duplicates of earlier lines, so the first spelling of each address is kept.

Options

Every setting, and when to use it

Case-sensitive and Ignore extra spaces
With both off, Ada@Example.com and "ada@example.com " count as duplicates of ada@example.com, which is what you want for emails and names. Turn Case-sensitive on for codes and IDs where case matters.
Order and Show
Keep original order leaves the first occurrence of each line where it was. Sort A–Z also alphabetizes the result. Show: Removed duplicates lists the lines that were dropped, to check the result.
CSV rows (keep header) and Compare columns
The first line is kept as the header and never compared. Leave Compare columns empty to compare whole rows, or name columns, such as email or 2, to treat rows as duplicates when only those fields match.

Good to know

Common problems and limits

Up to 10 MB or 1,000,000 lines. The first occurrence always wins; later duplicates are removed even if they have more data.

Compare columns splits each line on commas, semicolons or tabs and respects quotes, but it is not a full CSV editor. To look at a large CSV first, open it in the CSV Viewer.

Lines are compared exactly apart from the options above: "Acme Inc" and "Acme Inc." are different. To also order the list, use Sort Lines.

Audience

Who uses it

  • MarketersClean an email or contact list merged from several exports before importing it into a newsletter tool.
  • Developers and analystsDeduplicate IDs, log lines, URLs or keywords copied from a terminal or a spreadsheet column.
  • Ecommerce teamsRemove repeated SKUs or product rows from a CSV before uploading it to a store.

FAQ

Frequently asked

How do I remove duplicates in Excel or Google Sheets?

In Excel, select the data and use Data, Remove Duplicates, then choose the columns to compare. In Google Sheets, use Data, Data cleanup, Remove duplicates. Both change the sheet in place; this page is quicker for a pasted list and shows what was removed.

Can I remove duplicate lines in Word?

Word has no built-in command for it. Paste the text here, remove the duplicates, and paste the result back. For a list in a table, copying the column into Excel and using Remove Duplicates also works.

How do I remove duplicate lines in Notepad++ or VS Code?

In Notepad++, use Edit, Line Operations, Remove Duplicate Lines. In VS Code, open the Command Palette and run Delete Duplicate Lines in recent versions, or sort the lines first. Both compare lines exactly, including case and trailing spaces.

Is the matching case-sensitive?

Not by default: Apple and apple count as the same line, and so do lines that differ only in extra spaces. Turn on Case-sensitive, or turn off Ignore extra spaces, when those differences matter.

How do I remove duplicate rows from a CSV file?

Turn on CSV rows (keep header), so the header line stays on top. To treat rows as duplicates when only some fields match, enter those columns in Compare columns, by header name or number, such as email or 2,3.

Is my list sent anywhere?

No. The duplicates are removed in your browser. A copy of each run is saved to your past runs so you can reopen it, as described on the Privacy page.

Automation: an MCP tool remove_duplicate_lines(text, options) → text and an n8n node are planned for this tool.

GuideCleaning pasted text: line breaks, spaces, duplicates and sorting →Text pasted from PDFs, Word and web pages brings hidden breaks, odd spaces and duplicates. Fix them in the right order: breaks, spaces, duplicates, sort.
Built and maintained by Radhika SinghLast updated Questions: hello@operativez.ai