Remove Duplicate Lines
Remove duplicate lines from a list while keeping the first occurrence and the original order. Optional case-insensitive matching, trimming and sorting, all in your browser.
How it works
The first time each line appears it is kept; every later repeat is removed, so the original order is preserved. By default capitals are ignored (so “Apple” and “apple” count as the same) and surrounding spaces are trimmed before comparing, both are toggleable.
Your list stays in your browser, nothing is uploaded.
What this does
This tool removes duplicate lines from a list, keeping the first occurrence and the original order.
How to use it
- Paste your list.
- Choose case-sensitive matching or not.
- Optionally trim or sort.
- Copy the de-duplicated list.
How it works
The first time a line appears it is kept; every later repeat is removed. By default matching is case-insensitive, so “Apple” and “apple” count as the same line.
Understanding your result
The result keeps the first time each line appears and drops every later repeat, so the original order is preserved rather than sorted. Matching is case-insensitive by default, so Apple and apple collapse into one, turn that off if case matters. Whitespace counts too: two lines that look identical but differ by a trailing space are treated as different, so trim first if that is not what you intend.
Example
From “a, b, a, c” the result is “a, b, c”.
Sources & methodology
Last updated .
Frequently asked questions
Which copy of a duplicate is kept?
The first time a line appears it is kept; every later repeat is removed, so the original order is preserved.
Does capitalisation matter?
By default no, “Apple” and “apple” are treated as the same. Turn on case-sensitivity to keep them separate.
Is my list private?
Yes. Lines are compared in your browser; nothing is uploaded or stored.
Related tools
Word Counter
Count words, characters, sentences, paragraphs and lines as you type, with an estimated reading time. Fast and private, your text is analysed in your browser.
Case Converter
Convert text between UPPER, lower, Title, Sentence case and programmer styles like camelCase, PascalCase, snake_case, kebab-case and CONSTANT_CASE. Instant and in-browser.
Slug Generator
Turn any title into a clean, URL-friendly slug: accents are stripped, spaces and symbols become hyphens, and the result is lowercased. Slugify many lines at once, all in your browser.
Sort Lines
Sort a list of lines alphabetically, by length or numerically, in either direction, with optional case-sensitivity, trimming and duplicate removal. Runs entirely in your browser.