Skip to content
OnlineToolStudio

Line Counter

runs in your browserno sign-upfree

Count total, non-empty, blank and duplicate lines in any text instantly.

Result

Lines

3

2 with text

Non-empty lines
2
Blank lines
1
Unique lines
2
ignoring spaces at the ends
Duplicate lines
0
Longest line
237
characters
Avg. line length
170.5
characters (non-empty lines)

About this tool

This line counter counts how many lines your text has, and how many of them are non-empty, blank, unique or duplicated. It is useful for checking lists, log files, CSV rows, code and any text where each line is an item.

How to use

  1. Paste or type your text into the box.
  2. The line counts update instantly.
  3. Use the duplicate count to spot repeated entries in a list.

FAQ

Does a final line break count as a line?

The total includes every line, so a trailing line break adds an empty last line. The non-empty count ignores blank lines, so use it when you only want lines with content.

How are duplicate lines detected?

Non-empty lines are compared after removing spaces at the start and end. Lines that appear more than once are counted as duplicates.

Is my text saved or uploaded?

Nothing is uploaded — counting happens in your browser. Your last text is saved only in this browser (shared with the other counters) so you can continue later. Press Clear to remove it.

Related tools

All tools