Text Tools
Count Duplicate Lines
Count duplicate lines, list each unique line with its frequency.
Input lines
Options
Total lines
0
Non-blank lines
0
Unique lines
0
Duplicated lines
0
Unique lines with counts
No lines yet - paste some above.
About this tool
Paste one item per line - URLs, emails, IDs, log keys, anything. The tool collapses duplicates and shows each unique line with how many times it appeared. Options let you toggle case sensitivity, whitespace trimming, blank-line handling, and how the result is sorted (by count, alphabetically, or input order). Output can be copied with a leading count column so you can paste it into a spreadsheet.
FAQs
What counts as a 'duplicate line'?
Two lines are the same line if their text matches exactly - by default after trimming leading and trailing whitespace. Internal spacing is preserved, so 'foo bar' and 'foo bar' are different lines.
Is the matching case-sensitive?
Yes by default - 'Apple' and 'apple' are treated as different. Untick 'Case sensitive' to fold them together.
How does this differ from a text diff?
Text diff compares two separate texts line-by-line. This tool takes one list and tells you which entries repeat - useful for de-duping email lists, URLs, IDs, or log keys.
Can I paste a CSV column?
Yes - copy the column from your spreadsheet (one value per row) and paste. The output can be copied back with counts in the first column, which pastes back into a spreadsheet as two columns.
Does anything I paste leave my browser?
No. The whole counter runs in your browser as JavaScript - nothing is uploaded.
How large a list can it handle?
Tens of thousands of lines work comfortably in modern browsers. Hundreds of thousands may briefly pause while sorting.