Remove Duplicate Lines
Paste a list to keep only the first occurrence of each line. The original order is preserved unless you choose to sort.
Output
🔒 Runs in your browser. Your data is never uploaded.
How to use
- Paste your list, one item per line.
- Choose whether case and surrounding spaces matter.
- Copy the de-duplicated list; the status line shows how many lines were removed.
Why duplicates survive
Lines that look identical often differ by a trailing space, a tab, or letter case. Keep “Trim spaces” on and turn off “Case-sensitive” to catch those.
Frequently asked questions
- Is the order of lines kept?
- Yes. The first occurrence of each line stays where it was; later repeats are removed. Sorting is optional.
- How large a list can it handle?
- Hundreds of thousands of lines work fine, because processing is done locally with a hash set. The limit is your browser's memory.
- Are empty lines treated as duplicates?
- Empty lines are kept as they are unless you tick “Remove empty lines”, so paragraph spacing is not destroyed by accident.
Related tools
- Text DiffCompare two texts line by line and see what was added and removed.
- Word CounterCount words, characters, sentences, paragraphs and reading time as you type.
- Case ConverterConvert text between UPPER CASE, lower case, Title Case, Sentence case, camelCase, PascalCase, snake_case and kebab-case instantly.
- Regex TesterTest a regular expression against sample text and see every match, its position and capture groups.