Utilify

Remove Duplicate Lines

Remove duplicate lines from any text. Optional case-insensitive matching and sorting.

How to use Remove Duplicates

  1. 1
    Paste lines

    Paste the text — one item per line.

  2. 2
    Pick options

    Toggle case sensitivity and whether to sort the result.

  3. 3
    Get unique lines

    Duplicates are stripped, preserving the first occurrence.

About Remove Duplicates

Removing duplicate lines from text — log entries, email lists, CSV exports, output from shell commands, a list of URLs from a web scrape — is a tiny but constant chore. The Unix pipeline "sort | uniq" handles it in a terminal, but pasting into a tool is often faster when you are already in a browser, want to preview the result, or need options like case-insensitive matching or order preservation.

Utilify keeps the first occurrence of each line by default, preserving the original order — important when the order itself carries meaning (for example, the first email each customer used, or the first error each session encountered). Optional sorting alphabetizes the deduplicated output; optional case-insensitive matching treats "[email protected]" and "[email protected]" as the same line. Empty lines can be stripped in the same pass.

Order preservation is the key difference from the classic "sort | uniq" approach. That pipeline requires sorting first, which destroys the original sequence; here, deduplication happens in a single pass that remembers what it has already seen, so the surviving lines stay in exactly the order they first appeared. When you do want alphabetical output, the sort toggle is one click away — you get to choose, rather than having sorting forced on you.

Case sensitivity matters more than it first appears. Email addresses are effectively case-insensitive, so "[email protected]" and "[email protected]" are the same recipient and should collapse to one; but a list of case-sensitive passwords, API keys, or identifiers must be compared exactly, where treating "AbC" and "abc" as equal would silently delete real, distinct entries. The toggle lets you match the behavior to the data.

A subtle gotcha with any line deduplicator is invisible whitespace: a trailing space or a stray tab makes two otherwise identical lines compare as different, so they both survive. If duplicates you can clearly see are not being removed, the cause is almost always trailing whitespace — trimming the lines before deduping resolves it.

When to use Remove Duplicates

  • Deduping email lists

    Clean up a list scraped from multiple sources before importing to a mailing service.

  • Log analysis

    Find unique error messages by deduping log lines while preserving frequency context elsewhere.

  • Building wordlists

    Combine multiple wordlists for a project and strip duplicates without losing case-sensitive variants.

Frequently asked questions

Does it preserve the original order?+

Yes — by default the first occurrence of each line is kept in its original position. Enable the sort option if you want alphabetized output instead.

Are blank lines removed?+

Only if you choose to — toggle the option to strip empty lines in the same pass.

Can it match case-insensitively?+

Yes. Turn on case-insensitive matching to treat "[email protected]" and "[email protected]" as duplicates — useful for emails, and best left off for case-sensitive data like passwords or keys.

Why are obvious duplicates not being removed?+

Almost always trailing whitespace: a stray space or tab makes two lines that look identical compare as different. Trim the lines and they will collapse correctly.

Is there a size limit?+

It handles large lists comfortably since everything runs locally in your browser. Your data is never uploaded.

Related tools

From the blog