Sign up free

Remove Duplicate Lines

Paste a list, drop the repeats and keep the first of each line, in the original order or sorted.

About Remove Duplicate Lines

Remove duplicate lines from lists that were merged, exported twice or copied from several places: email addresses for a newsletter, keywords from different tools, order numbers, tags or file names. Paste the list and the result appears instantly with every repeat removed, keeping the first time each line appeared, in its original position.

Ignore spaces at the ends is on, so a line with a trailing space still matches the same line without one, and empty lines are dropped. Tick Ignore case to treat Apple and apple as duplicates too. Keep order leaves the list as it was, while A → Z, Z → A and By length sort what's left, with numbers in natural order so item 2 comes before item 10.

How to use Remove Duplicate Lines

  1. 1
    Paste your list

    Paste the list you want to remove duplicate lines from, one item per line, or open a TXT or CSV file.

  2. 2
    Choose how to match

    Tick Ignore case if capitals shouldn't matter. Spaces at the ends and empty lines are handled by default.

  3. 3
    Pick an order

    Keep order, or sort A → Z, Z → A or By length.

  4. 4
    Copy the clean list

    The counter shows how many duplicates went and how many lines are left, then copy or save the result.

Why use Cubfile for this

  • Keeps the first occurrence

    Duplicates are dropped after their first appearance, so the original order survives.

  • Flexible matching

    Optionally ignore capitals and spaces at the ends of each line.

  • Four ways to order

    Original order, A to Z, Z to A, or shortest to longest.

  • Natural number sorting

    Sorting understands numbers, so file 9 comes before file 10.

FAQ

Remove Duplicate Lines: questions and answers

How do I remove duplicate lines but keep the original order?
Leave the order on Keep order. Each line stays where it first appeared and later copies are dropped.
Can I remove duplicate lines in Excel data here?
For a single column, yes. Copy the column, paste it here, then paste the result back. To dedupe whole rows by selected columns, use Remove Duplicates in Excel.
Why weren't two similar lines treated as duplicates?
They differ in capitals or in spaces inside the line. Tick Ignore case for capitals, and for inner spaces run Text Cleaner first to collapse them.
How many lines can I paste?
Long lists work fine because everything runs in your browser. There's no set line limit and no daily task limit.
Is my list kept private when I remove duplicate lines?
Yes. The list never leaves your device, so it's safe for customer emails or internal IDs. Only a draft is saved in this browser until you clear it.
Share Remove Duplicate Lines with a friendIt runs in any browser, and they can try it without signing up.

Related tools

JSON JSON FormatterFormat, validate and minify JSON, errors pointed out by line.
TXT Text CleanerRemove extra spaces, empty lines and broken line breaks in one click.
TXT Text CompareCompare two texts side by side and see every change.
TXT Word CounterCount words, characters, Chinese characters, lines and reading time live.
TXT Base64 Encode and DecodeEncode and decode Base64 text and files.
AaTXT Case ConverterUPPER, lower, Title, Sentence, camelCase, snake_case and more.
TXT Find and Replace TextReplace words in text in bulk, with regular expressions if you need them.
TXT Password GeneratorMake strong random passwords on your device.