Back to Tools

Remove Duplicate Lines

Detect and eliminate repeated lines from your text

0
0
0
Input Lines

Reduce a list to its unique entries

Lists collect repeats without anyone noticing: email addresses merged from two exports, keywords copied from several sources, log entries, URLs or IDs. This tool reads your text one line at a time and keeps only the first appearance of each line, preserving the original order. Nothing is sorted, so your list stays in the sequence you gave it, just without the repeats.

How to dedupe a list

  1. Paste one item per line into Input Lines, or bring in a .txt file using File. The header shows characters, words and lines as you type.
  2. Pick your matching rules with the three checkboxes: Case-insensitive, Trim whitespace and Ignore blank lines. All three begin ticked.
  3. Click Remove Duplicates.
  4. Read the summary, which reports how many duplicate lines were removed and how many unique lines remain, then compare the Before and After counts.
  5. Press Copy or .TXT to keep the result.

What the options do

  • Case-insensitive treats Apple and apple as the same line. The version that appeared first is the one kept. Untick it when capitalization matters, such as with case-sensitive codes.
  • Trim whitespace strips spaces from both ends of every line before comparing, so an entry with a trailing space matches its clean twin. The kept lines are output in their trimmed form.
  • Ignore blank lines removes empty lines altogether. If you untick it, the first blank line survives and later blanks count as duplicates.

Practical uses

  • Merging two mailing lists and keeping each address once.
  • Cleaning a keyword or tag list before uploading it to an ad platform or CMS.
  • Removing repeated error messages from a copied log so the distinct problems stand out.
  • Deduplicating a list of domain names, SKUs or file names.

Things to keep in mind

Only whole lines are compared. Two lines that differ by even one character, such as a trailing period or a different quote style, count as different. With Trim whitespace turned off, invisible trailing spaces can stop lines from matching and leave what look like duplicates behind, so leave that box ticked unless indentation matters. Because the first occurrence wins, the tool is not the right choice when you want to keep the last occurrence. The processing runs as JavaScript in your browser page.


Related Tools

Related Tools


Frequently Asked Questions

Which copy of a duplicate line is kept?
The first occurrence is kept and every later match is removed, so your original order is preserved. If Case-insensitive is on and the first version was Apple, that capitalization is what appears in the output.
Why do some near-duplicates remain?
Lines are compared as whole strings, so a difference in punctuation, spacing or spelling makes them distinct. Keep Trim whitespace ticked to ignore leading and trailing spaces, and check for hidden differences like trailing periods.
Does it sort my list?
No. The unique lines come out in the same order they were entered, with only the repeats taken out. If you also want alphabetical order, copy the result and run it through a text sorter afterwards.
What happens to empty lines?
With Ignore blank lines ticked, empty lines are dropped entirely. If you untick it, the first empty line is kept and any further empty lines are removed as duplicates of it.
Can I use it on a big list?
You can paste or load a .txt file of many lines, and the work is done in your browser. Very large lists depend on your device's memory and speed, so split extremely big files if the page slows down.
Support Chat
We typically reply within minutes

Hello! 👋 Before we start, please tell us your name.