π Online Line Counter
π Client-side β Your data never leaves your browser
β
100% Free β No signup, no limits
β‘ Instant β No server processing
Paste text or code Β· Auto-count lines Β· Multi-language comment detection Β· 100% Client-Side
Paste code from your editor Β· Everything runs locally: Language and other values are processed on your device, never sent to a server
0
π Total Lines
0
βοΈ Non-Empty
0
β¬ Empty
0
π¬ Comments
0
β‘ Code
0%
π Comment Ratio
β Frequently Asked Questions
Which languages does this line counter support?
It supports JavaScript, TypeScript, Python, HTML, CSS, Java, C, C++, C#, SQL, Shell, Ruby, Go, Rust, and more. Select the corresponding language to accurately distinguish between code and comment lines.
Is my code data secure? Does it get uploaded?
Absolutely secure. All counting happens locally in your browser β your text and code never leave your device and are never uploaded to any server. This is one of the key advantages over online counting services.
How are empty lines and comment lines defined?
Empty lines are those containing only whitespace. Comment lines are identified based on the selected language β e.g., lines starting with # in Python, // in JS, or wrapped in /* */ blocks. Lines with code followed by a comment are counted as code lines, not comment lines.
Does it support multi-line block comments?
Yes. For languages with block comments (like /* */ in JS, """ in Python, in HTML), the tool identifies start and end markers and counts all lines between them as comment lines.
Can I count lines across an entire project?
The current version is designed for individual files or text snippets. For entire projects, consider using local tools like cloc (Count Lines of Code) or your editor's built-in statistics. You can also paste files one by one into this tool.