Skip to content
VELNARO

Line Counter

Paste any text or code to count total lines, blank lines, non-empty lines and the longest line.

Total lines

4

Non-empty lines

3

Blank lines

1

Longest line

25 characters

Characters

49

How this was worked out

  1. How it countsLines are split on the newline character; the last line counts even without a trailing break.

Formula

Lines = text split on newline characters

Frequently asked questions

Yes.

Related tools

Keep going — these tools solve the problems that usually come next.