Fastify vs Express: source lines of code compared

The Fastify vs Express comparison on OctoCounts shows side-by-side source line counts for fastify/fastify and expressjs/express, counted under the rules and on the dates stated below: files, total lines, code lines, comment lines, blank lines, and per-language totals, pinned to the exact commits listed below.

This page compares the source lines of code (SLOC) of fastify/fastify and expressjs/express using cached OctoCounts reports. Code size is not code quality: a larger count only means more source material, not a better or worse project.

As of 2026-11-04, fastify/fastify contains 14,988 total lines (11,132 code) across 80 files, while expressjs/express contains 9,408 total lines (2,619 code) across 70 files as of 2026-11-03. fastify/fastify has about 4.3x the counted code lines of expressjs/express under the same engine and counting rules. Code size is not code quality: a larger count only means more source material, not a better or worse project.

Metricfastify/fastifyexpressjs/express
Files8070
Total lines14,9889,408
Code lines11,1322,619
Comment lines2,2745,227
Blank lines1,5821,562
Languages counted57

Top languages in fastify/fastify: JavaScript (74.8% of code), TypeScript (22.9% of code), JSON (2.1% of code). Top languages in expressjs/express: JavaScript (90.5% of code), JSON (3.8% of code), Handlebars (2.7% of code). JavaScript, JSON appear in both top language lists; TypeScript, Shell, Markdown appear only in fastify/fastify's top languages; Handlebars, CSS, HTML appear only in expressjs/express's top languages.

Methodology: both counts come from cached OctoCounts reports generated with tokei. fastify/fastify was counted at ref main (commit 1b954e560226) on 2026-11-04; expressjs/express was counted at ref a419aa7350389a275ab45fde2e849ed1f02449ef (commit a419aa735038) on 2026-11-03. See the counting methodology for ignored directories and analysis options.

Both reports use the same engine and effective counting rules. Repository declarations, when enabled, are specific to each repository. fastify/fastify: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed. expressjs/express: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed.

About this comparison

Background observations recorded on 2026-09-16; language descriptions here are historical context, not claims about the current filtered shares. Use this page's measured language breakdown for current counts. Repository layout before counting filters: fastify/fastify is the Fastify core repository — the web framework and its plugin system — while expressjs/express is the Express core, the long-standing minimal Node.js web framework whose middleware ecosystem largely lives in separate repositories. Both repositories are of framework source trees rather than of applications built on them, taken on the dates in the methodology line above.

Both repositories expose Node.js web-server APIs, but package their routing, middleware, and supporting code differently. Use the selected per-language totals to compare the measured trees, rather than assuming their language proportions are fixed.

Neither archive includes the wider plugin/middleware ecosystems that both frameworks are known for — much of that code is published from separate repositories — so both counts understate the total library surface a typical application touches.

A smaller framework source tree does not mean a smaller or faster application: request throughput and memory use depend on the application, its middleware chain, and runtime configuration, none of which appear in these counts.

Sources: fastify/fastify repository · expressjs/express repository. Statements verified 2026-09-16.

Evidence and next steps:

Saved reports remain subject to cache cleanup and replacement. Export their JSON for durable citation; live report URLs can change.

Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.

Compare FAQ

Which has more lines of code, fastify/fastify or expressjs/express?

As of 2026-11-04, fastify/fastify contains 14,988 total lines (11,132 code) across 80 files, while expressjs/express contains 9,408 total lines (2,619 code) across 70 files as of 2026-11-03. fastify/fastify has about 4.3x the counted code lines of expressjs/express under the same engine and counting rules. Code size is not code quality: a larger count only means more source material, not a better or worse project.

Does more source lines of code mean more complexity?

Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use SLOC to gauge the scale of what you'd be reading or maintaining, not as a quality signal for fastify/fastify, expressjs/express, or any repository.

How is this comparison calculated?

Methodology: both counts come from cached OctoCounts reports generated with tokei. fastify/fastify was counted at ref main (commit 1b954e560226) on 2026-11-04; expressjs/express was counted at ref a419aa7350389a275ab45fde2e849ed1f02449ef (commit a419aa735038) on 2026-11-03. See the counting methodology for ignored directories and analysis options.

Can I compare a different branch, tag, or commit?

Yes. This page shows the default branch for each repository. Use the interactive comparison tool to pick any public GitHub repository, branch, tag, or commit SHA for both sides and get a fresh side-by-side report.