Duplicate Line Remover

Remove repeated lines from a block of text, keeping the first occurrence of each.

Your text is processed in your browser and is not sent to Numerila.

Worked example

The lines Apple, Banana, Apple, Cherry, Banana become Apple, Banana, Cherry. The first time each line appears is kept, in its original order.

How this works

Lines are compared exactly. Capital letters count, so "Apple" and "apple" are different lines, and spaces count, so "text" and " text" with a leading space are different lines too. Lines are never trimmed or changed before they are compared. If you want that, use the Whitespace Cleaner first. A blank line is still a line, so the first blank line is kept and later blank lines are removed like any other repeat.

The lines that are left stay in their original order and are never sorted. Their line breaks stay as they were, so text with Windows line endings comes back with Windows line endings. To put lines in order, use the Text Sorter.

What this result means

The result is your text with repeated lines removed, keeping the first time each line appears.

Examples

  • Five lines: Apple, apple, Apple, " Apple" (with a leading space) and Apple: Three lines are kept: Apple, apple and " Apple". Only exact repeats are removed, so a different capital letter or a leading space makes a line count as different.

Common mistakes

  • Expecting Apple and apple to be treated as the same line. Lines are compared exactly, so tidy the case or the spacing first if you want them to match.

Analytics only runs if you choose to allow it below. Advertising and affiliate tracking are not currently active on Numerila. Your preferences are saved in this browser, but these settings do not activate either service.