Count Non-Empty Lines
Count lines in any text live as you type: total, non-empty and blank lines, plus longest and average line length.
Processed entirely in your browser — nothing you enter here is ever uploaded.
Result
About this tool
Blank lines inflate a naive line count: a double-spaced list, a file with trailing empty lines, or notes with lots of paragraph breaks can look far longer than the content actually is. This page opens the line counter with the non-empty line count front and center.
A line counts as non-empty here if it has at least one non-whitespace character — a line that is just spaces or tabs is treated as blank, the same way most editors and linters draw the distinction. You still get the full picture alongside it: total lines, blank lines, longest line and average length.
Everything is computed live in your browser as you type or paste, with nothing uploaded anywhere.
Example. The text a, a blank line, then b counts as 3 lines, 2 non-empty, 1 blank, longest length 1, and average length 0.7.
Limit. A completely empty box is reported as zero lines, while a lone newline is reported as two lines, matching editor line numbering.