Line Counter
Count lines in your text as you type — total, non-empty, and blank lines, plus longest, shortest, and average line length. Great for lists, code, poetry, and data files.
0
Total lines
0
Non-empty lines
0
Blank lines
0
Longest line (chars)
0
Shortest line (chars)
0.0
Average line length
Frequently Asked Questions
- How do I count lines in a text?
- Paste or type your text into the box. The counters update live, showing the total number of lines, how many are non-empty, and how many are blank.
- What counts as a blank line?
- A line counts as blank when it contains no characters or only whitespace such as spaces and tabs. Every other line is counted as non-empty.
- How are longest, shortest, and average line length calculated?
- Line length is measured in characters. The longest and shortest values look at non-empty lines only, and the average is the mean character count across those non-empty lines.
- Can I count lines in code or data files?
- Yes. Paste the contents of any plain-text file — source code, CSV data, logs, or poetry — and the tool counts its lines instantly. Everything runs in your browser, so nothing is uploaded.