Count the lines in any text or list: total lines, non-empty lines, unique lines and duplicates.
Paste a list and see how many lines it holds, how many are actually filled in, and how many are repeats.
0Total lines
0Non-empty
0Unique
0Duplicates
0Characters
0Avg. length
How Does It Work?
Paste your listAnything with one item per line: emails, SKUs, URLs, names, log entries or code.
Read the countsTotal lines includes blanks; non-empty ignores them. Unique and duplicate counts are based on the non-empty lines.
Copy the numbered versionHandy when you need to refer to line 47 of a list in a message or ticket.
What Is It Used For?
Lists arrive as plain text far more often than as spreadsheets — pasted from an email, exported from a system, copied out of a log. Counting the lines, and knowing how many are repeats, is usually the first thing you want to know before doing anything with them.
Checking how many records are in a pasted export before importing them.
Verifying that a mailing list has the number of addresses you expect.
Counting lines of code or configuration in a snippet.
Spotting that a list contains duplicates before you act on it.
Referring to a specific line number when reporting a problem.
Examples
Input
Total lines
Non-empty
Unique
3 items, no blanks
3
3
3
3 items with a trailing blank line
4
3
3
5 items, 2 repeated
5
5
3
Empty box
0
0
0
Frequently Asked Questions
How are lines counted?
Every line break starts a new line. A block with no line breaks at all counts as one line, and an empty box counts as zero.
Does a trailing blank line count?
Yes, in the total. It is excluded from the non-empty count, which is usually the figure you want for a list of records.
How are duplicates detected?
By comparing whole lines. Tick the option to ignore case and surrounding spaces if "Apple" and " apple " should count as the same item.
How do I remove the duplicates?
Use the Remove Duplicate Lines tool, which keeps the first occurrence of each line and tells you how many it removed.
Is there a limit on list size?
Only your browser memory. Lists with tens of thousands of lines are handled without difficulty.
Why does my count differ from a spreadsheet?
A spreadsheet counts rows, and one row can hold a line break inside a cell, which is counted here as two lines. Spreadsheets also usually ignore the header row, whereas every non-blank line counts in this tool.
How do I count paragraphs instead of lines?
Use the Word Counter, which treats a block separated by a blank line as one paragraph. Here every line break starts a new line, so a paragraph wrapped across several lines is counted as several.
Free. No registration. This tool runs entirely in your browser, so the data you enter stays on your device.