piapia123
en

Duplicate Lines

Text

Everything runs locally in your browser — nothing is uploaded

Input
Drop a file here to load its contents
Output

Four outputs for four questions: the deduplicated list, only the lines seen more than once, only the lines seen once, and each repeated line with its count. The rule is whole-line equality; text pasted from Windows programs uses `\r\n` line endings, so the tool strips the trailing `\r` first — otherwise the last line is wrongly judged unique. Whether blank lines count is a switch, on by default so nothing is dropped silently. Everything runs in your browser; nothing is uploaded and nothing goes over the network.

Features

  • Four outputs: deduped list, repeats only, uniques only, repeats with counts
  • Whole-line equality, with Windows \r handled correctly
  • Ignore case and ignore leading/trailing whitespace, separately
  • Sort optionally, or keep first (or last) appearance order
  • Count blank lines or not — a switch, on by default
  • “With counts” puts the count first so it pastes into a spreadsheet
  • Reports the total, the unique count, and how many lines repeat
  • Everything runs locally in your browser; nothing is uploaded

How to use

  1. Paste the lines you want to process
  2. Pick an output mode (dedupe / repeats / uniques / repeats with counts)
  3. Tick ignore case, ignore whitespace, sort, and the other options as needed
  4. The result updates as you type; click Copy to take it

FAQ

Will text copied from Windows be counted wrongly?
No. Programs such as Notepad and Excel use `\r\n` line endings. If you split on `\n` only and leave the trailing `\r`, the last line no longer equals an earlier identical one. This tool strips the trailing `\r` first, so the comparison is correct.
Do blank lines count as duplicates?
By default yes — it is safer not to drop input silently. If your text has many blank lines you do not want in the stats, untick “Count blank lines too”.
Why does “with counts” put the count first?
Writing `3 × line` means you can paste the result into a spreadsheet and sort by the first column to get a frequency table, with no column rearranging.
When ignoring case, which spelling is kept?
The first occurrence as written — it is never lowercased. Ignoring case only affects whether two lines count as the same, not what is kept.

Related tools