Text tools

Remove duplicate lines.

Delete repeated lines and keep only the first of each — with options to ignore case and trim spaces.

This tool removes duplicate lines from your text, keeping the first occurrence of each unique line and deleting the rest. It can ignore letter case and trim whitespace so near-identical lines are matched too.
0 lines0 chars
Result
0 lines0 chars

What removing duplicate lines does

This tool scans your text top to bottom and keeps the first time each line appears, deleting every later copy. The order of your remaining lines is preserved exactly — it de-duplicates without sorting. Two options control what counts as a match: Ignore case treats "Hello" and "hello" as the same line, and Trim whitespace ignores leading and trailing spaces so " apple" and "apple" are treated as duplicates.

What you'd use it for

De-duplication is a staple of list cleanup: trimming repeated entries from an email or subscriber list, collapsing duplicate keywords or tags, cleaning log lines, tidying a CSV column you've pasted in, or merging two lists into one clean set. Because order is preserved, it's safe to run on lists where sequence matters.

How the options change matches

With both options off, only exact character-for-character duplicates are removed. Ignore case is useful for names and emails, where capitalization varies but the value is the same. Trim whitespace catches copies that differ only by stray spaces or tabs — a common artifact of copy-pasting from spreadsheets and PDFs. The result badge tells you how many duplicates were removed.

De-duping vs. sorting

Removing duplicates keeps your original order; sorting rearranges everything alphabetically. If you want a clean, alphabetized set, run sort lines after de-duping. To randomize instead, use shuffle lines.

How to use it

Paste your lines, choose whether to ignore case and trim whitespace, and the de-duplicated result appears instantly with a count of what was removed. Copy or download it. Everything runs in your browser — nothing is uploaded.

More text tools

Related free tools: reverse text · sort lines · remove duplicate lines · shuffle lines · fancy text · text repeater.

FAQ

Frequently asked.

The first occurrence of each line is kept; every later duplicate is removed. The order of your surviving lines is unchanged.

No. Unlike sorting, de-duplication preserves your original order and simply drops the repeats.

Ignore case treats "Apple" and "apple" as the same line. Trim whitespace ignores leading and trailing spaces or tabs, so copies that differ only by stray spacing are still caught.

Extra blank lines are treated like any other line — the first blank is kept and later blank duplicates are removed. To drop blanks entirely, run the result through sort lines with "Drop blank lines" on.

Sorting reorders your lines alphabetically; removing duplicates keeps your order and only deletes repeats. They're often used together.

No. De-duplication runs entirely in your browser; your text never leaves your device.