Line Counter
Count lines, blank lines, code lines, and comments. Analyze text and code with detailed statistics.
Statistics
Detailed Stats
Lines, words, characters
Code Mode
Comment detection
Line Numbers
Visual reference
100% Private
No data stored
Why Line Counting Matters
Line counting is essential for developers measuring codebase size, writers tracking document length, and data analysts processing log files. Our tool provides comprehensive statistics for both plain text and source code, with intelligent comment detection for multiple programming languages.
Common Use Cases
| Use Case | Mode | Key Metrics |
|---|---|---|
| Code Review | Code | Code lines, comment ratio |
| Documentation | Text | Total lines, words |
| Log Analysis | Text | Total lines, blank lines |
| Project Estimation | Code | LOC (Lines of Code) |
| Essay Writing | Text | Lines, words per line |
| Data Processing | Text | Non-blank lines |
Supported Programming Languages
Our code mode intelligently detects comments in:
- JavaScript/TypeScript: // single-line and /* */ multi-line comments
- Python: # single-line and """ """ docstrings
- Java/C/C++: // and /* */ style comments
- CSS: /* */ block comments
- HTML: <!-- --> comments
- SQL: -- single-line and /* */ multi-line comments
Frequently Asked Questions
What is LOC (Lines of Code)?
LOC is a software metric counting non-blank, non-comment lines. It's used to estimate project size, effort, and complexity.
How are comments detected?
We use language-specific patterns: // for JS/Java, # for Python, /* */ for multi-line in C-style languages, etc.
What counts as a blank line?
A line containing only whitespace (spaces, tabs) or nothing at all is counted as blank.
Is my code stored?
No! All processing happens in your browser. Your code never leaves your device.