⚡ BreezyTools Pro — Ad-free experience across all 200+ tools. Less than a coffee a month → Learn More

Remove Duplicate Lines

Strip out duplicate lines from any text — keep only the unique ones.

0 unique lines

Remove Duplicate Lines and Keep the Unique Ones

Paste a list and this tool removes repeated lines, keeping the first occurrence of each one in its original position. The cleaned list and a count of the remaining lines update as you type. It's useful for cleaning email and contact lists, merging keyword lists for SEO research, deduplicating URLs before building a redirect map, tidying log output, and removing repeated entries before you import data into a spreadsheet or database.

How to Remove Duplicate Lines

  1. Paste your lines into the Input box, one item per line.
  2. Set the three options described below. The defaults suit most lists.
  3. Check the output box and the unique-line count, then click Copy.

The Three Options

  • Case-insensitive (off by default): treats "Apple" and "apple" as the same line. Whichever version appears first is the one kept, with its original capitalization.
  • Trim whitespace (on by default): ignores spaces and tabs at the start and end of each line when comparing, so "apple" and "apple " count as duplicates. The output lines are trimmed as well. Turn it off when indentation matters, for example in code.
  • Skip empty lines (on by default): removes every blank line from the output. Turn it off to keep blank lines; they are then compared like any other line, so only the first one survives. With Trim whitespace off, a line containing only spaces doesn't count as empty.

Example

The sample list contains apple, banana, apple, cherry, Banana, banana, date. With the default settings the output is apple, banana, cherry, Banana, date: 5 unique lines, because "Banana" with a capital B is treated as a different line. Tick Case-insensitive and the result becomes apple, banana, cherry, date: 4 unique lines.

Tips for Cleaner Results

  • Only whole lines are compared. "apple pie" and "apple" are different lines, and so are "https://example.com" and "https://example.com/". Normalize near-duplicates such as trailing slashes before deduplicating.
  • Put one item on each line. A comma-separated list on a single line is treated as one line. Replace the commas with line breaks first.
  • Sort afterward if you need order. This tool keeps your original order. To alphabetize the result, paste it into Sort Lines.
  • Count what was removed. The output shows how many unique lines remain. Compare it with the total from the Line Counter to see how many duplicates were dropped.

Frequently Asked Questions

Does removing duplicates keep the original order?

Yes. Each unique line stays where it first appeared, and later repeats are simply dropped. Nothing is sorted or rearranged.

Which copy of a duplicate line is kept?

The first one. If "Banana" appears before "banana" and Case-insensitive is ticked, the output keeps "Banana" with its capital letter and removes the later lowercase version.

Is the comparison case-sensitive?

By default, yes: "Apple" and "apple" are kept as two separate lines. Tick Case-insensitive to treat lines that differ only in capitalization as duplicates.

How are spaces at the start or end of a line handled?

With Trim whitespace on (the default), leading and trailing spaces and tabs are ignored when comparing and removed from the output. Turn the option off to compare lines exactly as typed and keep their indentation.

What happens to blank lines?

With Skip empty lines on (the default), all blank lines are removed. With it off, the first blank line is kept and any later blank lines are removed as duplicates of it.

Is my list uploaded or saved?

No. The deduplication runs in your browser, so your list isn't sent to a server or stored. That makes it safe to use with private data such as customer emails.

Love using BreezyTools?

Go Pro for an ad-free experience, priority features, and support independent development — for less than a coffee a month.

Upgrade to Pro →