Search tools

Find a tool by name or what it does.

Remove Duplicate Lines

Paste a list and remove duplicate lines. Match case-insensitively, trim whitespace, keep the first or last copy, and optionally sort the result.

Deduplicated live as you type. Everything runs in your browser. Nothing is uploaded.

Options

Which copy to keep
Sort order
Matching options
0
Lines in
0
Unique lines
0
Duplicates removed

How to remove duplicate lines online

  1. Paste your list

    Drop your text into the input box with one item per line. The result updates as you type.

  2. Choose how lines are matched

    Turn on Ignore case and Trim whitespace so near-identical lines are treated as duplicates, then pick whether to keep the first or last copy.

  3. Sort the result if you want

    Leave the lines in their original order, or sort them A to Z or Z to A once the duplicates are gone.

  4. Copy the clean list

    Check the counter to see how many duplicates were removed, then click Copy to clipboard.

Why use this tool

Keep the first or last copy

Choose which occurrence of each repeated line survives. Keep first preserves the earliest copy, keep last preserves the most recent one.

Match the way you mean

Ignore case treats Apple and apple as the same line. Trim whitespace removes leading and trailing spaces so padded copies still count as duplicates.

Counts every duplicate removed

A live readout shows how many lines went in, how many unique lines remain, and exactly how many duplicates were dropped.

Optional alphabetical sort

Leave lines in their original order, or sort the deduplicated result A to Z or Z to A. Sorting runs after duplicates are removed.

Runs entirely in your browser

Everything happens on your device. Your list is never uploaded, and the tool keeps working offline once loaded.

About this tool

This tool takes a block of text, treats each line as one item in a list, and removes any line that repeats. It splits your input on line breaks, compares the lines, and keeps only one copy of each. That makes it a quick fix for lists that picked up duplicates along the way: email addresses, keywords, usernames, redirect rules, or any newline-separated data you need to be unique before you use it.

You control how strict the matching is. Trim whitespace strips leading and trailing spaces before comparing, so a line with a stray space still counts as a duplicate. Ignore case makes uppercase and lowercase letters equal, so Apple and apple collapse into one. Keep first or keep last decides which copy of a repeated line stays, and an optional A to Z or Z to A sort tidies the final list. The operations run in a fixed order: trim, then deduplicate, then sort.

A counter above the output reports how many lines went in, how many unique lines came out, and how many duplicates were removed, so you can see the effect at a glance. Everything runs in your browser and nothing is uploaded. To reorder lines instead of deduping them, use the line sorter. To clean up spacing inside each line, try the whitespace remover, and to swap text across the whole list, use find and replace.

Frequently asked questions

How do I remove duplicate lines?
Paste your text into the input box, one item per line. Duplicate lines are removed instantly and the clean list appears below. Adjust the matching options if you need to, then click the copy button to copy the result to your clipboard.
What is the difference between keep first and keep last?
When a line appears more than once, keep first leaves the earliest copy in place and drops the later ones. Keep last does the opposite: it removes the earlier copies and keeps the most recent occurrence.
How does case-insensitive matching work?
With Ignore case turned on, lines that differ only in letter casing are treated as the same line, so Apple, APPLE, and apple collapse into a single entry. The copy that survives keeps its original casing.
Are my lines uploaded anywhere?
No. Everything runs in your browser. Your text never leaves your device, never touches a server, and is not stored or logged.
Is there a limit on how many lines I can paste?
There is no hard limit. The tool comfortably handles tens of thousands of lines. For very large inputs you may notice a brief pause while your browser processes the change.

Related tools