1
OneClickUse
Text Tool

Duplicate Item Counter

Count how many times each line or list item appears.

Privacy-first workflows
Fast and simple
100% Free, no signup
Total lines
7
Counted lines
7
Unique items
4
Duplicates
2

Written by Anil Gautam · Updated

How are total, counted and unique lines calculated?

Total lines is every line in the box, blank ones included, and a final line break after the last item adds one more. Counted lines is what remains after blank lines are skipped. Unique items is the number of distinct values; each is listed once with its count, in the order it first appears. Duplicates is the number of distinct values that occur more than once. For the number of extra copies, subtract Unique items from Counted lines.

Paste Red, blue, Red, Green, red, Blue with a trailing space, an empty line and Red, one per line. With the default settings the output reads Total lines = 8, Counted lines = 7 and Unique items = 5, followed by Red = 3, blue = 1, Green = 1, red = 1 and Blue = 1. The Duplicates card shows 1, since only Red repeats.

The copied output keeps that layout: the three totals, a blank line, then one item = count row per value. To move the counts into a spreadsheet, paste the rows and use the split text to columns feature with = as the separator, checking any item that contains an equals sign of its own.

How do the trim, blank line and case options change the counts?

Turn off Case sensitive and the same list gives Red = 4, blue = 2 and Green = 1: three unique items, two of them duplicated, and 7 minus 3 = 4 extra copies. Each group keeps the first spelling found, which is why blue stays lowercase although Blue also appears.

The Trim spaces option strips spaces from both ends of each line before comparing, so Blue with a trailing space counts the same as Blue; turn it off when leading spaces are part of the data. Ignore blank lines skips empty and space-only lines. With it off, blank lines are counted as an item with an empty label, shown as a row with nothing before the equals sign. Sort by count lists the most frequent items first and breaks ties alphabetically.

When should you use a different list tool?

Each line is one item, so a comma-separated row counts as a single value; put each value on its own line first. For word frequency inside running text, Keyword Density Analyzer counts individual words and phrases. Remove Duplicate Lines deletes repeats and keeps one copy of each line in its original order, and Compare Lists shows which values one list has that the other lacks. Counting runs in your browser.

How it works

How to count duplicate items

STEP 01
Paste one item per line.
STEP 02
Adjust trimming, blank line, case, or sorting options.
STEP 03
Copy the item counts from the output.
You might also need

Related tools

Text
Compare Two Lists Online
Find differences, shared items and a combined list. Paste lists or import text files, adjust matching rules, then copy or download the results.
Use now
Text
Text Diff Checker Online
Compare text or text files line by line. See additions and removals in side-by-side or unified view, ignore case or spaces, and download a diff report.
Use now
Text
Text Repeater
Repeat any text multiple times on separate lines.
Use now
Text
Reverse Text
Reverse characters in any text instantly.
Use now
Text
Remove Duplicate Lines
Remove repeated lines from text while keeping the first occurrence.
Use now
Text
Find and Replace
Find exact text and replace it throughout your input.
Use now
FAQ

Common questions