Paste a list and see how many times every line appears, most frequent first. Show only the repeated lines or only the unique ones, ignore case or extra spaces, and export the counts as text or CSV.
Last updated:
Show
e.g. 3 = only lines that appear 3 or more times.
Enter your values to see the result.
Advertisement
Advertisement
How to use the Count Duplicate Lines
Paste your list with one item per line.
Choose what to show: all lines with counts, only duplicates or only unique lines.
Set matching options such as ignore case and trim spaces.
Pick a sort order and output format, for example CSV for a spreadsheet.
Copy or download the counts, or download the full frequency table.
Example
For the list apple, banana, Apple, cherry, banana, kiwi, apple, banana (one per line) with Ignore case on:
Tally survey or form answers exported one per line.
Find repeated email addresses, SKUs or IDs before an import, using Only duplicates.
Spot the noisiest log messages: paste log lines (with timestamps removed) and sort by count.
Check a word list or keyword list for accidental repeats.
Count votes or picks where each line is one vote.
Matching options explained
Ignore case: Apple, APPLE and apple are one line.
Trim spaces: “apple ” with a trailing space matches “apple”. Invisible trailing spaces are the most common reason two lines that look identical are counted separately.
Treat multiple spaces as one: “New York” matches “New York”.
Ignore accents: “café” matches “cafe”.
Frequently asked questions
How do I count how many times each line appears?
Paste the text into the box. Every distinct line is listed with its count, highest first. The summary also shows how many lines are repeated, how many appear only once and the most frequent line.
What is the difference between this and removing duplicate lines?
Removing duplicates gives you a clean list with each line once. Counting duplicates tells you how often each line occurred, which is what you need for tallies such as survey answers, log entries, votes or repeated orders.
Is “Apple” the same as “apple”?
With Ignore case on (the default) yes, they are counted together and the first spelling seen is displayed. Turn it off for a case-sensitive count.
What does “extra copies” mean?
It is the total number of lines minus the number of distinct lines: the number of lines a duplicate remover would delete. For example 12 lines with 6 distinct values have 6 extra copies.
Can I get the same output as the Unix command sort | uniq -c | sort -rn?
Yes. Choose the count ⇥ line format and sort by count, highest first. Unlike uniq, the lines do not need to be sorted first, because counting here is done on the whole list.
How do I open the counts in Excel or Google Sheets?
Choose CSV as the output format and download the .txt (rename to .csv), or press Download CSV above the frequency table, which also includes the share and line numbers.
Is my data sent anywhere?
No. All counting happens in your browser, so the list never leaves your device.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.