Remove Duplicate Lines

How to use

Removes repeated lines from a block of text, keeping only the first occurrence of each one. You can match case-sensitively or not, and sort the result afterward. Paste your text and the cleaned list appears.

Text UtilitiesLocal only
When to use this
  • Cleaning a mailing list that has been merged from several exports and now has repeated addresses
  • Deduplicating a keyword list before importing it into an SEO or ad campaign tool
  • Removing repeated lines from notes copied from multiple sources during research
  • Tidying up a list of URLs or IDs before feeding them into another script

Free and private. Everything runs on your own device, with no account and no uploads.

Anyone cleaning up a mailing list, a keyword list, or notes copied from multiple sources ends up with repeated lines cluttering the file. This tool scans a block of text line by line and removes exact duplicates, with an option to sort the remaining lines alphabetically afterward, so you end up with a clean, unique list in seconds instead of manually scrolling through hundreds of rows.

By default lines are compared exactly, so "Apple" and "apple" are treated as different lines unless you lowercase the text first.

Leading and trailing whitespace differences can cause two visually identical lines to be treated as different; trim your text first if you want strict matching.

The first occurrence of each line is kept and later duplicates are discarded.

The sort option is applied alongside deduplication in this tool; use the dedicated Sort Lines tool if you only want sorting.

The tool runs entirely in your browser, so practical limits depend on your device memory rather than any server-imposed cap.

How it works
  1. 1

    Paste your list

    Add the text with one item per line into the input box.

  2. 2

    Choose sorting behavior

    Optionally enable sorting of the deduplicated lines.

  3. 3

    Remove duplicates

    Click the button to strip out repeated lines, keeping the first occurrence of each.

  4. 4

    Copy the cleaned list

    Copy the deduplicated output for use elsewhere.

Pro tips
  • ·Lowercase your text first if you want "Apple" and "apple" treated as the same line, comparison is case-sensitive by default.
  • ·Trim trailing spaces before pasting, since two visually identical lines with different whitespace will not be caught as duplicates.
  • ·Remember only the first occurrence of each line is kept, so reorder your list beforehand if you care which version survives.