Remove Duplicate Lines from Pasted Text

Free · No sign-up · Nothing uploaded

Paste a list, a log, a set of notes, or any block of text with repeated lines and get back a clean version with every duplicate removed. Choose whether to match case, ignore surrounding spaces, and keep the first or last occurrence of each line.

Your text is processed locally in your browser and never uploaded. We do not upload or store your text.
1Paste your text 2Choose options 3Click Remove Duplicates 4Copy the result

What this does

This tool scans your text line by line and removes every line that has already appeared above it. The first occurrence is kept, the rest are dropped. Switch on "Keep last occurrence" to flip the logic — the final appearance of each line is kept instead.

Three options control how lines are compared before deciding whether they match. "Ignore case" makes the comparison case-insensitive, so Apple and apple count as the same line. "Ignore spaces at the start and end of lines" ignores leading and trailing spaces when comparing, so a line with padding matches its clean counterpart — but the original spacing is always preserved in the output. "Keep last occurrence" reverses the direction so the last version of each repeated line is the one that survives.

Blank lines are treated as lines too — multiple consecutive blank lines are reduced to one. Your wording is never changed; only duplicate lines are removed.

Before and after

Pasted text

Project kickoff meeting notes
Review the Q3 budget proposal
Send follow-up emails to stakeholders
Project kickoff meeting notes
Update the project timeline
Review the Q3 budget proposal
Schedule team check-in for Friday

After removing duplicates

Project kickoff meeting notes
Review the Q3 budget proposal
Send follow-up emails to stakeholders
Update the project timeline
Schedule team check-in for Friday

Common sources of duplicate lines

Repeated lines usually appear when lists or data are assembled from more than one place:

How to Use

  1. 1 Copy the list, log, or notes that contain repeated lines.
  2. 2 Paste it into the Text with duplicate lines box above.
  3. 3 Choose your matching options and click Remove Duplicates.
  4. 4 Click Copy to copy the deduplicated result.

Common Uses

  • Deduplicating a list of email addresses, names, or keywords copied from multiple sources
  • Cleaning up merged meeting notes or task lists before sharing them
  • Removing repeated entries from a pasted log before reading or searching it
  • Tidying a copied CSV or TSV before importing it into a spreadsheet or database
  • Stripping repeated attribution lines from a forwarded email thread

Common Questions

Does my text get uploaded anywhere?

No. We do not upload or store your text. The tool runs as JavaScript on your device; there is no server that receives your text, and nothing is kept after you close the tab.

How does the tool decide which lines are duplicates?

Two lines are treated as duplicates if their comparison keys are identical. The key is the line itself — optionally with leading and trailing spaces removed and lowercased, depending on your options. Ignoring leading/trailing spaces is on by default so that apple and apple match; case sensitivity is on by default so that Apple and apple do not.

What happens to blank lines?

Blank lines are treated as lines with empty content. If your text has multiple blank lines in a row, only the first one is kept — the rest are treated as duplicates and removed. A single blank line between paragraphs is preserved as-is.

Does it change the wording of any lines?

No. Lines are only compared, never rewritten. The original text of each kept line is always output exactly as you pasted it — the options only affect how lines are matched against each other, not what is written to the output.