Lines of Code Counter
Count total lines, non-empty lines, and blank lines in code or text. Free, instant.
How to use this tool
- Enter code or text in the fields above.
- Results update instantly as you type — or click Calculate.
- Read your total lines and the full breakdown beneath it.
Quickly count total lines, non-empty code lines, and blank lines in any snippet — useful for estimating project size or documentation density.
Frequently asked questions
- What counts as a blank line?
- A blank line is one containing only whitespace (spaces and tabs). Comments are counted as non-empty lines.