Skip to content
uxTools
Developer

Code Line Counter

Paste any source file and instantly break it down into total, code, comment and blank lines — comment-aware for JavaScript, Python, C-like, HTML, CSS, shell and SQL.

Language
Source code
Result
Total8
Code450%
Comment338%
Blank113%

How lines are counted

Every physical line is placed in one bucket. A line is blank when it holds only whitespace, comment when all of its visible characters belong to a comment, and code otherwise — so a statement followed by a trailing comment still counts as code. Block comments such as /* … */ or <!-- … --> are tracked across multiple lines. Pick the language that matches your source so the right comment markers are recognised. Nothing is uploaded; the analysis happens locally in your browser.