Paste text to keep only duplicate lines from your input. Detect repeated lines, keep one copy or all duplicate occurrences, optionally include counts, and preserve original line text and order. All processing runs locally in your browser.
Paste your text below to keep only duplicate lines. The tool compares lines in order, ignores empty lines, and returns duplicated lines only.
The Keep Only Duplicate Lines tool scans your text line by line and returns only lines that appear at least 2 times. It preserves original line text exactly in output and ignores empty lines automatically.
line text (3 times).Apple and apple as duplicates.Input:
apple banana apple orange banana banana
Output (Keep one copy enabled):
apple banana
Output (Keep one copy disabled):
apple banana apple banana banana
Output (Keep one copy enabled + Include count):
apple (2 times) banana (3 times)