Line Counter

Count lines in any text

Your Text

Statistics

14

Total Lines

11

Non-Empty Lines

3

Blank Lines

17

characters

Avg Line Length

69

#9

Longest Line

What is Line Counter?

The Line Counter instantly counts lines in your text, including total lines, non-empty lines, blank lines, and lines containing specific patterns. Useful for code analysis, log file inspection, and document statistics.

How to use

  1. Paste your text or upload a text file into the input area.
  2. View instant statistics: total lines, non-empty lines, blank lines, and average line length.
  3. Optionally filter by a search pattern to count only matching lines, or copy the statistics summary.

Result

You paste a 500-line Python script to check its structure. The counter shows 500 total lines, 387 non-empty, 113 blank lines, average length of 34 characters, and the longest line is 119 characters — helping you decide whether to refactor.

Related Tools