Remove Duplicate Lines

The list apple, banana, apple, cherry, banana (one per line) cleans down to 3 unique lines — apple, banana, cherry — with 2 duplicates removed.

—

Everything is worked out in your browser — your text and numbers are never uploaded anywhere.

How it works

Email lists merged from three spreadsheets, inventory pasted twice, keywords collected from five tools — duplicates creep into every list. Paste the list, and the cleaned version appears in the panel in the original order, first occurrences kept, with the duplicate count printed so you know what was removed.

The case option matters more than it looks: “Apple” and “apple” are different lines to a computer and the same line to a person. Tick the box for the human rule.

The method

Lines are split on line breaks and compared exactly (or lowercased, when the case-insensitive box is ticked). The first occurrence of each line is kept, later repeats dropped; the cleaned list preserves the original order.

Check important dates twice. Every result here is worked out from the values you enter and the calendar, clock and counting conventions described on the page. Date and time answers can depend on time zones and daylight-saving rules, and counting tools follow the definitions printed with them. For deadlines, filings, payroll or anything with money attached, confirm the figure against an authoritative source.

Frequently asked questions

Does it sort the list?

No — order is preserved exactly. Deduping and sorting are different jobs; this one keeps your order so position-based lists stay meaningful.

What about lines that differ only by spaces?

Lines are compared as typed (apart from the case option), so a trailing space makes a line technically different. That strictness is deliberate — silently trimming could merge genuinely different entries.

How many duplicates were removed?

The panel reports lines in, lines out and duplicates removed, so the cleaning is auditable before you copy the result.

Embed this tool

Put this tool on your own site for free — copy the code below. It runs entirely in the visitor's browser, like it does here.

<iframe src="https://calcwhen.com/embed/remove-duplicate-lines/" width="100%" height="520" style="border:1px solid #d9d5f2;border-radius:12px" loading="lazy" title="Remove Duplicate Lines — CalcWhen"></iframe>

Tool by CalcWhen — please keep the credit link so others can find the original.