# 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 with the same engine and analysis options on the dates shown in the methodology line: files, total lines, code lines, comment lines, blank lines, and per-language totals, pinned to the exact commits listed below.

As of 2026-09-16, fastify/fastify contains 14,756 total lines (10,995 code) across 80 files, while expressjs/express contains 9,402 total lines (2,619 code) across 70 files as of 2026-09-16. fastify/fastify is about 4.2x the size of expressjs/express by code lines. Code size is not code quality: a larger count only means more source material, not a better or worse project.

| Metric | [fastify/fastify](https://octocounts.com/github/fastify/fastify) | [expressjs/express](https://octocounts.com/github/expressjs/express) |
| --- | ---: | ---: |
| Files | 80 | 70 |
| Total lines | 14,756 | 9,402 |
| Code lines | 10,995 | 2,619 |
| Comment lines | 2,188 | 5,223 |
| Blank lines | 1,573 | 1,560 |
| Languages counted | 5 | 7 |

Top languages in fastify/fastify: JavaScript (74.6% of code), TypeScript (23.2% of code), JSON (2.0% 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 630acd0b6cf8a91322ff05c3d95feb991091866d (commit 630acd0b6cf8) on 2026-09-16; expressjs/express was counted at ref 9a34acf03cb818ff3f8bc40e44176e277a25cbb9 (commit 9a34acf03cb8) on 2026-09-16. See the [counting methodology](https://octocounts.com/docs/methodology) for ignored directories and analysis options.
## About this comparison

fastify/fastify counts the Fastify core repository — the web framework and its plugin system — while expressjs/express counts the Express core, the long-standing minimal Node.js web framework whose middleware ecosystem largely lives in separate repositories. Both counts are of framework source trees rather than of applications built on them, taken on the dates in the methodology line above.

Both repositories are implemented predominantly in JavaScript, as the per-language tables show; the difference between the counts is one of overall tree size, not of implementation language.

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](https://github.com/fastify/fastify) · [expressjs/express repository](https://github.com/expressjs/express). Statements verified 2026-09-16.

Evidence and next steps:

- [fastify/fastify SLOC report](https://octocounts.com/github/fastify/fastify)
- [expressjs/express SLOC report](https://octocounts.com/github/expressjs/express)
- [Compare fastify/fastify and expressjs/express interactively](https://octocounts.com/compare?left=https%3A%2F%2Fgithub.com%2Ffastify%2Ffastify&right=https%3A%2F%2Fgithub.com%2Fexpressjs%2Fexpress)

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?

fastify/fastify has more code: 10,995 code lines versus 2,619 for expressjs/express, about 4.2x as much, based on cached OctoCounts reports as of 2026-09-16.

### 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 630acd0b6cf8a91322ff05c3d95feb991091866d (commit 630acd0b6cf8) on 2026-09-16; expressjs/express was counted at ref 9a34acf03cb818ff3f8bc40e44176e277a25cbb9 (commit 9a34acf03cb8) on 2026-09-16. 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.

## Related OctoCounts pages

- [Interactive repository comparison](https://octocounts.com/compare)
- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [OctoCounts API docs](https://octocounts.com/docs/api)
