Count your code, line by line

A ledger-room counter for refactors, KPI reports and honest scale claims. Total, Code, Comment, Blank — per file, per language, one click to CSV.

Drop files or a whole folder

Everything is counted locally in your browser — nothing is uploaded. Drag anywhere in this zone, or browse:

01 · The Calibers

Three calibers, one ledger

Physical line counts flatter generated code; comment-only counts hide documentation debt. LinesTool keeps all four numbers side by side, aligned with the conventions of cloc, so a scale claim survives an audit.

Code lines

const rate = 0.5;
let total = base * rate;  // price

Lines with at least one effective code character. A statement with a trailing comment still counts as code — only pure-comment lines move to the comment column.

Comment lines

// load defaults
/* legacy shim */

Single-line remarks (//, #, --) and every line inside a block comment — tracked across lines with a state machine, not a regex.

Blank lines

const a = 1;
                ← blank
const b = 2;

Empty or whitespace-only lines. They cost nothing to read but say a lot about formatting style — so they get their own column, never silently merged.

Total (physical)

2 code + 2 comment
+ 2 blank = 6 total

The plain newline count — the number wc -l would give you. Total always equals Code + Comment + Blank; if it doesn't, the scanner is wrong.

02 · Detection

The language fingerprint

An extension alone lies — deploy scripts hide in .sh files with Python inside. Every file passes through four checks, most-authoritative first:

i.

Well-known filenames

Extensionless staples map directly: Dockerfile, Makefile, CMakeLists.txt, .gitignore, .bashrc, .vimrc.

ii.

Shebang override

The #! first line wins over any extension — #!/usr/bin/env python3 inside run.sh is counted as Python, as the kernel would run it.

iii.

Extension index

40+ language tables cover mainstream extensions (.ts, .kt, .rs, .vue, .sql, .yaml…) including less common ones like .plt-style MATLAB blocks and PowerShell <# #>.

iv.

Content sniff

No extension, no shebang? Structure gives it away: <?php headers, def/class indented blocks, package main + func, {"key": JSON shapes, --- YAML front matter.

 1  #!/usr/bin/env python3
 2  import json
 3  
 4  def load(path):
 5      """Load a JSON config."""
 6      with open(path) as fh:
 7          return json.load(fh)

A run.sh file — the Shebang line says Python, so the scanner counts it as Python. The """...""" docstring is recognized as a block comment, not code.

the case for counting what compilers skip

When you need to report project size, estimate effort, or compare codebase density across teams, raw file size is misleading. A minified library and a verbose, well-commented module can weigh the same in bytes. This counter reads each source file, classifies every physical line as code, comment, or blank, and hands you the breakdown per file and per language. It runs entirely in your browser, so proprietary source never touches a server. Engineers, technical leads, and documentation writers get auditable numbers without pipeline setup or CLI flags.

03 · FAQ

Frequently asked

The questions auditors, leads and résumé reviewers actually ask.

How do I count lines of code in a project?

Drag your files or an entire folder onto the drop zone — or use the Choose Files / Choose Folder buttons. LinesTool walks the directory tree, detects each file's language and totals everything into a ledger: physical, code, comment and blank lines, with per-language subtotals and a file-by-file manifest you can export to CSV.

What is the difference between Total, Code, Comment and Blank lines?

Total counts every physical line separated by a newline. Code lines contain at least one effective code character — including mixed lines like a statement with a trailing comment. Comment lines contain only comments: single-line // or # remarks and every line inside a /* ... */ block. Blank lines are empty or whitespace-only. The calibers match cloc: Total = Code + Comment + Blank.

How does it know which programming language a file is?

A four-step fingerprint, most authoritative first: well-known extensionless filenames, the Shebang line (which overrides the extension), the file extension across 40+ language tables, then a content sniff of structural features like def ...: blocks, <?php headers or JSON object shapes.

Can it count a whole folder at once?

Yes. Drag a folder onto the drop zone and it is traversed recursively with each file's relative path preserved in the report. Heavy directories — node_modules, .git, dist, build, .next, target, vendor, __pycache__, venv — are skipped by default, and you can switch that off with the toggle under the drop zone.

How is this different from wc -l?

wc -l only counts physical newlines, so a generated bundle and a hand-written module look identical. LinesTool separates code from comments and blanks with a string-aware scanner — it knows a // inside a string literal is not a comment — and reports per-language subtotals, the same three-caliber reporting used to size refactors and audits.

Can I export the line count report to CSV or Excel?

Yes. Export CSV produces an RFC 4180 compliant file with a UTF-8 BOM, so Excel opens it with correct encoding. It contains one row per file (path, language, four line counts, code ratio, bytes), a subtotal block per language, and a grand TOTAL row — ready for KPI reports and budget spreadsheets.

Which languages are supported?

40+ language families: JavaScript/TypeScript, Python, Java, C#, C/C++, Go, Rust, Ruby, PHP, Swift, Kotlin, Scala, Dart, HTML, Vue/Svelte, CSS/SCSS, JSON/JSON5, YAML, TOML, INI, XML, Markdown, SQL, Shell, PowerShell, Lua, Perl, R, MATLAB, Makefile, Dockerfile, Haskell, Elixir, Erlang, Clojure, Vim script, Batch and Objective-C — plus plain text.

Is my source code uploaded to a server?

No. All parsing and counting runs entirely in your browser with client-side JavaScript. Files never leave your machine — nothing is transmitted, logged or stored, which makes it safe for proprietary code, unreleased projects and work covered by NDAs. Close the tab and every trace is gone.

Latest Articles

Automating GitHub repository LOC counts into structured CSV files for remote teams
Last March, I watched our engineering manager spend eleven hours across three days manually tallying lines of code across forty-seven GitHub repositories.
Which raw code statistics belong in a CSV export: building a developer metrics schema
Last quarter, our platform team shipped a developer metrics portal for Meridian — an 80-engineer organization where every squad lead wanted exportable data for quarterly reviews.
Bridging syntax differences: normalizing static analysis metrics across 7 programming languages
Last March, I stood in front of our CTO presenting a code quality dashboard. Every repository was green. Every team was "within acceptable thresholds."
How to parse multi-language LOC CSV exports to isolate code smells in legacy files
The first time I audited a 2.4-million-line polyglot estate for a migration readiness report, I did what most engineers do with a fresh LOC CSV export: I opened it in a spreadsheet, sorted descending…
Multi-language LOC Counter CSV: Track Sprints Without Setup
Stop counting code by hand. Learn how multi-language LOC counter CSV exports turn messy sprint data into clear agile productivity metrics. Read our guide now!
Multi-Language LOC Counter: 2026 Sprint CSV Checkup
Picture smoother sprint reviews. Learn how multi-language LOC counter CSV exports measure code quality and agile productivity. Grab your data and analyze it!
Code Quality Metrics: Wrangling 7 Languages Into One CSV
Struggling to measure code quality metrics across multi-language repos? Follow one real workflow from setup to CSV export—and learn what matters. Read on.
Stop Guessing Technical Debt: LOC CSV Exports Fix Sprints
Stop letting hidden code rot ruin sprints. Track technical debt using multi-language LOC counters and CSV exports. Build concrete agile review checklists now.
How to measure agile coding productivity using multi-language LOC counters and CSV file analysis
Here's the move that saves you hours of awkward sprint review meetings: run a multi-language LOC counter that outputs straight to CSV, then sort the delta column.
LOC Counters CSV Export: Fixing Agile Review Lag
We used multi-language LOC counters with CSV export to track agile metrics in code reviews. See how this real example improved coding productivity. Read now.
Stop Guessing Agile Productivity: LOC Counter CSV Exports
Stop guessing team output. Track agile coding productivity using multi-language LOC counter CSV exports to expose true progress. Ditch vanity metrics right now.
Agile Coding Productivity: LOC CSV Exports vs Story Points
Stop guessing agile coding productivity. Compare story points against multi-language LOC counter CSV exports to track real engineering output. Try the script!
How to Track Agile Coding Productivity by Exporting Multi-language Loc Statistics to CSV
Here's the trick that saved my last retrospective: export your multi-language LOC stats to CSV mid-sprint , not at the end. By Wednesday of week two, you still have time to course-correct.
LOC Counter CSV Exports: Fix Agile Sprint Bloat
Stop guessing sprint health. Use multi-language LOC counter CSV exports to expose hidden code bloat, fix errors, and master agile code reviews. Read more!
Code Line Counter 2026: Agile Productivity Face-Off
We weigh two ways to track agile coding productivity using a multi-language code line counter. See our full CSV export workflow duel and pick your winner now!
How to Use Multi-language Loc Counter CSV Exports to Measure Coding Productivity in Polyglot Agile Projects
Measure coding productivity in polyglot agile projects: export multi-language LOC data to CSV, normalize counts across languages, and join them to git blame for a defensible sprint view.
How to use multi-language LOC counter CSV exports to identify technical debt in legacy codebases
You're sitting in a conference room at 4:47 PM on a Wednesday. The VP of Engineering just slid a laptop across the table and said, "We acquired these three companies last quarter.
Code Metrics: LOC Stats vs Biased Agile Reviews
Tired of biased agile code reviews? I used multi-language LOC statistics and CSV exports to measure real coding productivity. Steal my exact tracking fix.
Multi-Language LOC Counter CSV: Agile Metrics Compared
Compare manual tracking versus multi-language LOC counter CSV exports to measure agile code review productivity accurately. Discover the superior method today.
Convert Code Line Counter Data: CSV Metrics Minus Mistakes
Stop fighting messy outputs. Convert code line counter data into clean CSV metrics. We expose common blunders and fix them step-by-step. Start learning today!
2 Methods Multi-Language Loc Counter Weighs Developer Output
We weigh two evidence-led approaches tracking developer productivity via multi-language loc counter. See which method yields reliable code metrics. Read now.
Using File Analysis Tools to Measure Coding Productivity and Code Quality
Last spring, I inherited a mid-sized Python codebase from a team that had quietly disbanded.
3 Code Statistics Mistakes Ruining Open Source Audits
Comparing two ways to generate code statistics and LOC reports? We expose the 3 biggest open source mistakes and fix them side-by-side. Read our review now!
CSV Export: Cyclomatic Complexity vs Churn Code Review
Weighing complexity vs churn? Discover which programming metrics belong in your CSV export code review. Compare both approaches in our evidence-led breakdown.
Code Metrics: Cyclomatic Complexity 15 Stalls Sprint Velocity
Analyze real code metrics from a 4-week sprint where complexity 15 stalled agile tracking. Identify review bottlenecks, see the evidence-led fix. Read the guide.
How to Measure Code Quality Statistics Across Multiple Programming Languages
That gap is not a trivia fact. It is the reason your quarterly quality report looks like a collage of unrelated numbers. SonarQube tells you one thing about your Java services.
Lines of Code Productivity: 4 Step Metrics Comparison 2026
Does tracking lines of code improve software engineering productivity? Weigh both approaches side-by-side using this 4-step tutorial. Review the metrics today.
Best Open Source Code Line Counter with CSV Export for Developer Tools
A mid-sized engineering team writes approximately 47,000 lines of code per sprint cycle. Yet when quarterly reviews demand evidence of productivity, 68% of engineering managers resort to manual…
Agile LOC Counter: Multi-Language File Analysis Guide
Learn how to use a LOC counter for multi-language file analysis in agile projects. Track code metrics accurately and boost productivity. Read our guide now!
Export Code Metrics to CSV for Multi-Language Projects
Learn how to export code statistics to CSV for multi-language projects. Track code metrics, analyze data, and boost your workflow. Read our step-by-step guide!

View All Articles →