Duplicate Line Remover
Paste a list and remove duplicate lines, keeping the first occurrence of each.
Removed 4 duplicate lines.
How to use this tool
Paste one item per line. The first copy of each line is kept where it was, later copies are removed, and the number removed is shown. Three switches decide what counts as the same line: capital letters, spaces at the ends of lines, and whether blank lines are left alone.
Worked example: an email list from two sources
asha@example.com Ravi@Example.com asha@example.com␠ ravi@example.com meera@example.com asha@example.com
(␠ marks a trailing space, typical of a column copied from a spreadsheet.) With the default settings, 3 lines are removed and the result is asha@example.com, Ravi@Example.com, a blank line, meera@example.com and the final blank line. The trailing-space copy counts as a repeat, and so does ravi@example.com, since capitals don't matter in an email address. The first spelling seen, Ravi@Example.com, is the one kept.
Choosing the switches
- Case-sensitive on for anything where capitals carry meaning: product codes like
AB-12andab-12, passwords or file names on Linux. - Ignore spaces off only when indentation matters, such as lines of code or YAML, where
name:andname:are different. - Keep blank lines off to squash a list that has gaps in it; with it on, text separated into paragraphs keeps its breaks.
Frequently Asked Questions
Can it sort the list as well?
No; the order you pasted is kept on purpose, because the first line often matters (the newest entry, or the preferred spelling). To sort, paste the result into a spreadsheet and sort the column there.
Which occurrence gets kept when a duplicate is found?
The first occurrence is always kept, and every later repeat of that same line is removed — the output preserves the original order of first appearances rather than reordering or sorting the list.
Will it find near-duplicates, like "Asha Rao" and "Rao, Asha"?
No. Lines are compared whole, after the optional capitals and end-spaces rules, so any other difference in spelling, word order or punctuation keeps both lines. Near-duplicates need to be found by eye, for example by sorting the list first so similar entries sit together.
Related Tools
Related Blog Posts
How to Use QR Codes for Marketing, Docs, and Events
How much a QR code can hold, why a shorter or uppercase link gives a code that scans more easily, what error correction actually protects against, and how to size one for print.
Read moreHEX, RGB and HSL: How the Conversions Work and Where They Round
#4F46E5 converted to RGB and HSL step by step, why 89.4% of all colours change when copied as whole-number HSL, why HSL lightness is not brightness (yellow and blue at 50% differ eightfold in contrast), and the alpha that hex can't write exactly.
Read more10 CSS Gradient Ideas You Can Copy and Customize
Ten copy-ready CSS gradients (buttons, dark surfaces, progress bars, stripes, glows, gradient text, photo overlays), plus how gradient angles work and how to avoid the muddy grey middle.
Read more