# Ktor vs Spring Boot: source lines of code compared

The Ktor vs Spring Boot comparison on OctoCounts shows side-by-side source line counts for ktorio/ktor and spring-projects/spring-boot, 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, ktorio/ktor contains 207,245 total lines (120,238 code) across 2,000 files, while spring-projects/spring-boot contains 447,125 total lines (245,337 code) across 4,910 files as of 2026-09-16. spring-projects/spring-boot is about 2.0x the size of ktorio/ktor by code lines. Code size is not code quality: a larger count only means more source material, not a better or worse project.

| Metric | [ktorio/ktor](https://octocounts.com/github/ktorio/ktor) | [spring-projects/spring-boot](https://octocounts.com/github/spring-projects/spring-boot) |
| --- | ---: | ---: |
| Files | 2,000 | 4,910 |
| Total lines | 207,245 | 447,125 |
| Code lines | 120,238 | 245,337 |
| Comment lines | 61,127 | 139,939 |
| Blank lines | 25,880 | 61,849 |
| Languages counted | 12 | 12 |

Top languages in ktorio/ktor: Kotlin (91.6% of code), JSON (3.0% of code), C Header (2.6% of code). Top languages in spring-projects/spring-boot: Java (87.1% of code), JSON (4.9% of code), JavaScript (3.5% of code). JSON, YAML appear in both top language lists; Kotlin, C Header, Rust appear only in ktorio/ktor's top languages; Java, JavaScript, XML appear only in spring-projects/spring-boot's top languages.

Methodology: both counts come from cached OctoCounts reports generated with tokei. ktorio/ktor was counted at ref 37a29f9a84b96ed7391b7b4804e0469a8a0de8ee (commit 37a29f9a84b9) on 2026-09-16; spring-projects/spring-boot was counted at ref 32b09e479b78afd151577df37e800f47711db749 (commit 32b09e479b78) on 2026-09-16. See the [counting methodology](https://octocounts.com/docs/methodology) for ignored directories and analysis options.
## About this comparison

ktorio/ktor counts the Ktor repository: the Kotlin server and client framework, maintained as a multi-module build of plugins and engines. spring-projects/spring-boot counts the Spring Boot repository: the auto-configuration machinery, starters, and actuator on top of the wider Spring ecosystem. Both counts measure server-side framework source trees, counted on the dates shown above.

The per-language tables show the language split cleanly: Ktor's counted code is overwhelmingly Kotlin, while Spring Boot's is overwhelmingly Java — each framework's chosen implementation language.

Both repositories are framework layers rather than finished servers: each ships configuration and integration machinery rather than an application, and Spring Boot additionally builds on the Spring Framework, which lives in a separate repository and is counted separately on this site.

_Framework repository size does not indicate application memory footprint, startup time, or developer productivity; a running service includes the framework pieces it uses plus the application and its dependencies. Compare the counts as the reading surface of each framework's source._

Sources: [ktorio/ktor repository (multi-module framework)](https://github.com/ktorio/ktor) · [spring-projects/spring-boot repository](https://github.com/spring-projects/spring-boot). Statements verified 2026-09-16.

Evidence and next steps:

- [ktorio/ktor SLOC report](https://octocounts.com/github/ktorio/ktor)
- [spring-projects/spring-boot SLOC report](https://octocounts.com/github/spring-projects/spring-boot)
- [Compare ktorio/ktor and spring-projects/spring-boot interactively](https://octocounts.com/compare?left=https%3A%2F%2Fgithub.com%2Fktorio%2Fktor&right=https%3A%2F%2Fgithub.com%2Fspring-projects%2Fspring-boot)

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, ktorio/ktor or spring-projects/spring-boot?

spring-projects/spring-boot has more code: 245,337 code lines versus 120,238 for ktorio/ktor, about 2.0x 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 ktorio/ktor, spring-projects/spring-boot, or any repository.

### How is this comparison calculated?

Methodology: both counts come from cached OctoCounts reports generated with tokei. ktorio/ktor was counted at ref 37a29f9a84b96ed7391b7b4804e0469a8a0de8ee (commit 37a29f9a84b9) on 2026-09-16; spring-projects/spring-boot was counted at ref 32b09e479b78afd151577df37e800f47711db749 (commit 32b09e479b78) 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)
