Line Counter
Count lines in a list, log file, CSV export, or code snippet, including blank lines.
Your text stays in your browser.
About this tool
Every line break starts a new line, so the count is the number of line breaks plus one. Blank lines are included. A trailing line break at the end of the text adds one empty last line, which many editors also show.
How to use it
- Paste your text or code.
- Read the line count in the summary.
- To ignore blank lines, run the text through Remove Empty Lines first.
Lines = line breaks + 1
Examples
Three-item list
apple, banana, cherry on separate lines is 3 lines.
Trailing newline
The same list with a line break after "cherry" is 4 lines; the last one is empty.
FAQ
Are blank lines counted?
Yes. Every line counts, including empty ones. Use Remove Empty Lines if you want to exclude them.
Does it handle Windows line endings?
Yes. Windows line endings (CR LF) still contain a line feed, so each one counts as one line break.
Can I count lines of code?
Yes, but comments and blank lines are included. It does not parse code.

