# NestJS vs Express: source lines of code compared

The NestJS vs Express comparison on OctoCounts shows side-by-side source line counts for nestjs/nest 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, nestjs/nest contains 123,736 total lines (101,739 code) across 1,930 files, while expressjs/express contains 9,402 total lines (2,619 code) across 70 files as of 2026-09-16. nestjs/nest is about 39x 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 | [nestjs/nest](https://octocounts.com/github/nestjs/nest) | [expressjs/express](https://octocounts.com/github/expressjs/express) |
| --- | ---: | ---: |
| Files | 1,930 | 70 |
| Total lines | 123,736 | 9,402 |
| Code lines | 101,739 | 2,619 |
| Comment lines | 11,567 | 5,223 |
| Blank lines | 10,430 | 1,560 |
| Languages counted | 11 | 7 |

Top languages in nestjs/nest: TypeScript (68.6% of code), JSON (30.7% of code), JavaScript (0.2% of code). Top languages in expressjs/express: JavaScript (90.5% of code), JSON (3.8% of code), Handlebars (2.7% of code). JSON, JavaScript appear in both top language lists; TypeScript, GraphQL, YAML appear only in nestjs/nest'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. nestjs/nest was counted at ref 8e03a7dee8e5438d84b243557eda89bb36492fe7 (commit 8e03a7dee8e5) 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

nestjs/nest counts the NestJS framework repository: its core packages, platform adapters, sample projects, and documentation — a TypeScript framework that runs on top of an underlying HTTP server library (Express by default). expressjs/express counts the Express framework itself, a comparatively minimal JavaScript web framework for Node.js. The two counts are related layers rather than substitutes, and both were taken on the dates in the methodology line.

The per-language tables show the difference in implementation language directly: NestJS is written in TypeScript, while the Express codebase is predominantly JavaScript — each project's chosen language for its public API surface.

NestJS ships sample applications and multiple platform packages inside its repository, so part of its count exists to demonstrate and adapt the framework rather than to run as the framework core.

_NestJS normally runs on top of Express (or an alternative adapter), so the two counts overlap in the stack rather than compete; neither number says anything about which suits a given application._

Sources: [nestjs/nest repository](https://github.com/nestjs/nest) · [expressjs/express repository](https://github.com/expressjs/express). Statements verified 2026-09-16.

Evidence and next steps:

- [nestjs/nest SLOC report](https://octocounts.com/github/nestjs/nest)
- [expressjs/express SLOC report](https://octocounts.com/github/expressjs/express)
- [Compare nestjs/nest and expressjs/express interactively](https://octocounts.com/compare?left=https%3A%2F%2Fgithub.com%2Fnestjs%2Fnest&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, nestjs/nest or expressjs/express?

nestjs/nest has more code: 101,739 code lines versus 2,619 for expressjs/express, about 39x 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 nestjs/nest, expressjs/express, or any repository.

### How is this comparison calculated?

Methodology: both counts come from cached OctoCounts reports generated with tokei. nestjs/nest was counted at ref 8e03a7dee8e5438d84b243557eda89bb36492fe7 (commit 8e03a7dee8e5) 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)
