Remove Duplicate Lines
Delete repeated lines from a list — keep the first or last copy, or drop every repeated line.
Remove Duplicate 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
- 1Paste your list, one item per line.
- 2Choose whether to keep the first copy, the last copy, or remove every line that repeats.
- 3Set the comparison options: case sensitivity, ignoring spaces, and how to treat empty lines.
- 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.
Related tools
- Available
Text Sorter
Sort lines A–Z, Z–A, numerically, naturally or by length — or reverse and shuffle them.
Text ToolsOpen tool - Available
Remove Extra Spaces
Clean up duplicate spaces, tabs and blank lines in one click.
Text ToolsOpen tool - Available
Text Diff Checker
Compare two texts line by line, word by word or character by character, with highlighted changes.
Text ToolsOpen tool - Available
Word Counter
Count words, sentences, paragraphs and reading time as you type, with an optional keyword check.
Text ToolsOpen tool