Remove Duplicate Lines - Complete Guide

Remove repeated lines from a list in your browser, with ignore-case, trim, keep first or last, and sorting options.

1 min read

Remove Duplicate Lines removes repeated lines from a list and leaves one copy of each. Your text is processed in your browser and is not uploaded.

How to Use#

  1. Paste your list into Your text, one item per line. The Result updates as you type.
  2. Turn on the options you need:
    • Ignore case so "Shoes" and "shoes" count as the same line.
    • Trim spaces before comparing so leading and trailing spaces don't count.
    • Remove empty lines to drop blank lines.
    • Show only duplicates to list just the lines that were repeated.
  3. Under Keep, choose First (default) or Last copy of each repeated line.
  4. Under Sort, choose None (original order), A-Z or Z-A.
  5. Click Copy result or Download .txt.

Things to know#

  • Default matching: with no options on, two lines match only if they are exactly the same, including capitals and spaces.
  • Original text is kept: with Ignore case or Trim on, the kept line keeps its original text; only the comparison changes.
  • Counts: the tool shows Total lines, Unique lines and Duplicates removed, plus how many empty lines were removed when that option is on.
  • Sorting: numbers sort in natural order, so item2 comes before item10.
  • Download: the file is saved as unique-lines.txt.
  • Privacy: everything runs in your browser.

Tips#

  • When merging email or phone lists from two sheets, turn on Ignore case and Trim spaces before comparing to catch near-duplicates.
  • Use Clear to empty the input and start again.

Related: Word Counter, Case Converter

Was this page helpful? Suggest an edit