Skip to content

Remove Duplicate Lines

Delete repeated lines from a list — keep the first or last copy, or drop every repeated line.

AvailableRuns in your browserFree · No sign-up

Remove Duplicate Lines

Which line to keep
Comparison options

When off, “Apple” and “apple” count as the same line.

Compare lines without surrounding spaces. The kept line is output exactly as written.

Keep blank lines where they are instead of treating them as duplicates.

Delete blank and whitespace-only lines from the output.

0 lines
0 lines
Original lines
0
Unique lines
0
Not counting blank lines
Lines removed
0
Output lines
0

Paste text above to remove repeated lines instantly. Nothing is uploaded.

Your data is processed locally in your browser and is not uploaded to OZVILO servers.

How to use the Remove Duplicate Lines

  1. 1Paste your list, one item per line.
  2. 2Choose whether to keep the first copy, the last copy, or remove every line that repeats.
  3. 3Set the comparison options: case sensitivity, ignoring spaces, and how to treat empty lines.
  4. 4Copy the result, download it as a .txt file, or select it all.

Examples

  • Keep first occurrence

    Input
    apple banana apple cherry
    Result
    apple banana cherry
  • Ignore case, keep last

    Input
    Apple banana apple
    Result
    banana apple

Remove Duplicate Lines features

  • Keep the first occurrence, keep the last, or remove every repeated line
  • Case-sensitive or case-insensitive comparison, and optional trimming of surrounding spaces
  • The kept line is output exactly as you wrote it, even when comparison ignores case or spaces
  • Keep, compare or remove empty lines
  • Counts of original, unique, removed and output lines; Unicode-aware

Frequently asked questions

What's the difference between the three modes?

“Keep first” keeps each line where it first appears. “Keep last” keeps it where it last appears. “Remove all repeated lines” deletes every copy of any line that appears more than once, leaving only lines that were unique to begin with.

Does ignoring case change my text?

No. It only affects which lines count as the same. The line that's kept is output with its original capitalization and spacing.

Are accented characters handled correctly?

Yes. Text is compared after Unicode normalization, so “café” typed with a combined or separate accent counts as the same line.

How many lines can it handle?

Hundreds of thousands. Processing happens in your browser, so very large lists depend on your device's memory.