Skip to content

Remove Duplicate LinesBeta

Remove duplicate lines from a list. Ignore case, trim whitespace, or ignore empty lines. Your input never leaves your browser.

0 characters · 0 lines

Compare by

Output

No duplicate lines found.0 characters · 0 lines

Need to sort the result? Try the "Sort Lines" tool.

How to use

Paste your list into the input box, one value per line, and the result with duplicate lines removed appears in the output box. There is no button to press, and the result keeps updating as you edit the input. Use the copy button to grab the result.

What counts as the same line

By default, two lines only count as duplicates when their content matches exactly, character for character — a single extra space or a different letter case makes them different lines. The options below let you loosen that comparison.

  • Ignore case: treats Apple, apple and APPLE as the same value, and keeps only the spelling that appeared first.
  • Trim whitespace before comparing: ignores leading and trailing spaces and tabs when comparing, so hong@test.com and hong@test.com count as the same value. This only affects the comparison — the whitespace on the lines that remain in the result is left untouched.
  • Ignore empty lines: leaves empty lines (or, with trimming on, lines that contain only whitespace) out of both the result and the duplicate check. With this off, several empty lines are treated as duplicates of each other and only one is kept.
  • Show removed lines only: shows the duplicate lines that get removed instead of the lines that are kept, so you can review what was dropped.

For each unique value, the first occurrence is kept and every later occurrence of the same value is removed. The number of lines actually removed is shown above the result.

When this is useful

Use it when you need to strip out repeats after merging email or username lists from several files, cleaning up a list of values copied from a spreadsheet with repeated entries, or combining attendee or contact lists from different people. It is built for line-based lists, not multi-line paragraphs or tabular data where a single record spans several lines.

Privacy

Your input is processed entirely inside this browser and is never sent to a server or stored. Closing the page clears whatever you pasted.

Frequently asked questions

Can I get the result in sorted order?

No. This tool always shows the result in the order values first appeared. To sort the values, use the "Sort Lines" tool.

Can values with different capitalization be treated as the same?

Turn on "Ignore case" to treat Apple and apple as the same value and keep only the first spelling that appeared. Leave it off to treat lines with different capitalization as different values.

Trailing spaces are making identical values look different.

Turn on "Trim whitespace before comparing" to ignore leading and trailing spaces when comparing lines. The spaces on the lines that remain in the result are not removed — only the comparison ignores them.

Can I see which lines were removed?

Turn on "Show removed lines only" to flip the result: instead of the lines you keep, it shows the duplicate lines that would otherwise be removed, in the order they appeared. Useful for double-checking before you rely on the cleaned list.