Skip to content
Kordu Tools Kordu Tools

Remove Duplicate Lines

Runs in browser

Remove duplicate lines from text instantly. Keeps first occurrence, case-sensitive or insensitive.

Last updated 08 Apr 2026

Paste any text and remove all duplicate lines, keeping only the first occurrence of each. Toggle case-sensitive comparison and whitespace trimming. Shows how many unique lines remain and how many duplicates were removed. Runs entirely in your browser — nothing is uploaded.

Result
Loading rating…

How to use

  1. 1

    Paste your text

    Paste or type text that contains duplicate lines you want to remove.

  2. 2

    Configure comparison options

    Enable or disable case-sensitive comparison and whitespace trimming to control how lines are matched.

  3. 3

    Copy the result

    Deduplicated text appears instantly in the output box. Click Copy to send it to your clipboard. Stats show how many unique lines and duplicates were found.

Frequently asked questions

Does it keep the first or last occurrence of a duplicate?
It keeps the first occurrence and removes all subsequent copies. The relative order of kept lines is preserved.
What does case-sensitive comparison mean?
With case-sensitive comparison on (the default), 'Apple' and 'apple' are treated as different lines and both are kept. With it off, they are treated as duplicates and only the first is kept.
What does 'trim whitespace before comparing' do?
Lines are compared after stripping leading and trailing spaces. A line with ' hello ' and a line with 'hello' will be treated as duplicates. The original line content (with whitespace) is kept in the output — only the comparison is normalised.
Does it remove blank lines?
If your text has multiple blank lines, all but the first will be removed as duplicates. Use the Remove Empty Lines tool if you want to remove all blank lines.
Will it sort the text?
No. The output preserves the original order of lines — it only removes duplicates without reordering anything.
Is my text uploaded or stored?
No. All processing happens in your browser using JavaScript. Your text never leaves your device.

The Kordu Remove Duplicate Lines tool finds and removes repeated lines from

any block of text, keeping the first occurrence of each unique line and

discarding subsequent copies. Order is preserved — the tool does not sort

your text, it only removes exact duplicates.

Two options control how lines are compared. Case-sensitive comparison (on by

default) treats "Hello" and "hello" as different lines. Turn it off to remove

duplicates regardless of capitalisation. Trim whitespace compares lines after

stripping leading and trailing spaces, so lines that differ only in indentation

are treated as duplicates.

Common uses: deduplicating lists of URLs, email addresses, names, or IDs;

cleaning up copy-pasted data with repeated headers; removing repeated log

entries; and normalising exported data from spreadsheets or databases.

All processing runs client-side in your browser. Your text is never uploaded,

stored, or transmitted to any server.

Related tools