About Us
LinesTool is a free online code line counter. It exists because "how big is this codebase?" gets asked for very different reasons — scoping a refactor before quoting it, backing a KPI report with real numbers, or substantiating the project-scale line on a résumé — and each of those deserves more than wc -l and hope.
What the Tool Does
Drop files or a whole folder on the counter and it hands back a ledger. Three ideas shaped every design decision:
- One number is never enough. A physical line count flatters generated code; a code-only count hides documentation debt. LinesTool reports all four calibers side by side — Total, Code, Comment, Blank — aligned with the conventions of
cloc, so a scale claim survives an audit. - Detection should think like a kernel. Language identification runs a four-step fingerprint: well-known filenames, then the Shebang line — a
#!/usr/bin/env python3inside a.shfile overrides the extension, exactly as the system would execute it — then 40+ extension tables, then a content sniff of structural features. - Counting must not be fooled by text. A string-aware scanner walks every line with a state machine that knows the difference between a comment marker inside a string literal and a real comment, and tracks block comments across lines. Regexes cannot do this; the ledger demands it.
Our Approach
A line counter sees your most sensitive material — proprietary source, unreleased projects, work covered by NDAs. That is why everything runs in your browser:
- No uploads. Files are read, parsed and counted locally with JavaScript. Nothing is transmitted to any server.
- No sign-up. No accounts, no email walls, no watermarks.
- No stored history. Close the tab and every trace is gone.
When you need the numbers elsewhere, the Export CSV button produces an RFC 4180 compliant file with per-file rows, per-language subtotals and a grand total — ready for Excel, budget spreadsheets and review decks.
The Name
"LinesTool" says what it is: a tool for lines. The site is styled like a ledger room because that is the honest metaphor — counting code is bookkeeping. Files enter the manifest, languages get their subtotal rows, and the grand total closes with the accountant's double rule. Every line accounted, none invented.
Get in Touch
Found a file that counts incorrectly, or a language the scanner should learn? We would love to hear from you — visit our contact page and drop us a line.