Remove Duplicate Lines Online

Paste a list and remove duplicate lines instantly in your browser, with live counts and optional sorting.

Your list is deduplicated locally in your browser and is never uploaded, so even large or sensitive lists stay on your device.

Comparing two lists instead? Try the Text Diff.

About Remove Duplicate Lines

This remove duplicate lines tool takes any list you paste — a column of emails, log entries, URLs, keywords, or CSV rows — and returns only the unique lines, updating live as you type. Turn on case-insensitive matching to treat Apple and apple as the same, trim each line so trailing spaces do not hide a match, and choose whether to keep the first or the last occurrence of every duplicate. You can also drop blank lines and then sort the result alphabetically, in reverse, by natural numeric order, or by length. Running counts show how many lines went in, how many are unique, and how many duplicates were removed, so you can dedupe and sort a list in one pass. Everything runs entirely in your browser, so the text you paste is processed locally and never leaves your device.

Features

How to use the Remove Duplicate Lines

  1. Paste your list, one item per line, into the input box.
  2. Toggle case-insensitive, trim, keep-first-or-last, and remove-blank-lines to taste.
  3. Pick a sort order, or leave it on the original order.
  4. Read the unique result on the right and check the stats for how many duplicates were removed.
  5. Click Copy to grab the result, or Download to save it as unique-lines.txt.

Example

Input

apple
Banana
apple
cherry
banana
date
Apple
date

Output

apple
banana
cherry
date

With case-insensitive on and sort A→Z, eight lines collapse to four unique entries.

Common errors & troubleshooting

Frequently asked questions

How do I remove duplicate lines from a list?
Paste your list into the input box, one item per line, and the tool instantly shows only the unique lines on the right. Adjust the case-insensitive, trim, and keep options if some near-matches should count as duplicates.
Does it keep the first or the last copy of a duplicate?
By default it keeps the first occurrence and drops later copies. Turn on Keep last occurrence to preserve the final copy of each duplicate instead, while still removing the earlier ones.
Can it sort the lines too?
Yes. After deduping you can sort the unique lines A→Z, Z→A, by natural numeric order, by line length, or simply reverse them. Leave the sort on original order to keep the input sequence.
Will it treat different letter cases as duplicates?
Only if you want it to. By default matching is case-sensitive, so Apple and apple are kept separately. Turn on Case-insensitive to collapse them into one line.
How does it count duplicates removed?
The stats show input lines, unique lines, and duplicates removed. Duplicates removed is simply the input line count minus the number of unique lines kept, measured after any blank-line removal.
Is my text uploaded when I dedupe it?
No. The whole operation runs in your browser, so the list you paste is processed locally on your device and is never sent to a server.

Related tools

All ArrayKit tools