Remove Duplicate Lines
Deduplicate text lines with exact, trimmed, or case-insensitive matching, keeping the first occurrence.
Loading tool…
How to use Remove Duplicate Lines
Turn repeated entries into a unique list. Choose how lines should be compared while preserving the original text of each first occurrence.
- Paste one entry per line.
- Choose exact matching or ignore surrounding whitespace or case.
- Run the tool to keep the first appearance of each matching line.
Good to know
- Output uses LF line endings. Blank lines also deduplicate, leaving at most one matching blank line.
- Ignore-case uses Unicode default lowercase comparison. It does not combine whitespace normalization or perform accent folding.
Compare trimmed lines while retaining the first original spelling
Choose Ignore surrounding whitespace and paste the four-line list below. The first two lines compare equal after trimming, so only the first is retained, including its leading and trailing spaces. Apple remains because this comparison does not ignore letter case. The result preserves first-occurrence order rather than sorting the list. This is useful when repeated exported entries differ only in surrounding whitespace but you still want the original first entry as evidence. Review the comparison before replacing your source list.
Four lines; the first line has one space on each side
apple apple pear Apple
Expected three-line result; first-line spaces are retained
apple pear Apple
- Exact text compares every character. Ignore letter case lowercases comparison keys but does not also trim them; these are separate modes.
- CRLF and CR line endings are read as line separators and output uses LF. Matching blank lines also deduplicate.
- The tool does not remove accents, normalize Unicode spellings or sort the surviving entries. Use the separate sorting tool if ordering is the next task.
Common questions
Does the tool sort my list?
No. It preserves the order of the first occurrence of each line. Use Sort Lines afterward if needed.
Does trimmed matching change the output lines?
No. Trimming affects comparison only; the first original line is kept with its whitespace.
Keep going with related tools
All text →Sort Lines
Sort text lines ascending or descending with natural numeric ordering, keeping duplicate entries.
TextRemove Empty Lines
Remove blank lines from text, optionally retaining lines that contain spaces or tabs.
TextLine Counter
Count total, non-empty, and blank lines in pasted text, including trailing line breaks.
TextRepeated Word Proofreader
Find adjacent literal word repeats and identical paragraphs while retaining original source offsets.
SEOAds.txt Record Inspector
Inspect ads.txt seller-record syntax,duplicate entries and literal variable declarations locally.
TextText List Comparator
Find common or exclusive entries in two text lists with an explicit comparison policy.