Line Counter
Paste or type your text to count lines instantly — no signup, nothing sent to a server.
Total lines
0
Non-empty lines
0
Empty lines
0
Longest line
0
How to use the line counter
-
1
Paste or type your text
Drop your text into the box above, or start typing directly.
-
2
Watch the counts update
Total, non-empty, and empty line counts refresh instantly with every keystroke.
-
3
Check the longest line
See which line number is longest and the average line length across your text.
Example use cases
Code & config review
Check the line count of a pasted snippet or config file before sharing it.
CSV & data files
Estimate row counts in plain-text or CSV-like data pasted as text.
Poetry & scripts
Confirm line counts stay within a required structure or format.
Log files
Spot how many entries or blank separators are in a chunk of log output.
Frequently asked questions
What counts as a line?
Each line break (a new line character) starts a new line. A blank line — one with no characters, or only whitespace — still counts as a line, but is reported separately as "empty".
How is "longest line" measured?
By character count, including any spaces on that line. The line number shown is 1-indexed, so "line 1" is the first line of your text.
Does trailing whitespace count?
Yes, trailing spaces on a line are included in that line's character count for the longest-line and average-length figures.
Is my text sent to a server?
No. Every count updates entirely in your browser as you type — nothing is transmitted or logged.