# Fiber vs Gin: source lines of code compared

The Fiber vs Gin comparison on OctoCounts shows side-by-side source line counts for gofiber/fiber and gin-gonic/gin, 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-15, gofiber/fiber contains 166,877 total lines (118,932 code) across 331 files, while gin-gonic/gin contains 23,588 total lines (16,080 code) across 109 files as of 2026-09-15. gofiber/fiber is about 7.4x the size of gin-gonic/gin by code lines. Code size is not code quality: a larger count only means more source material, not a better or worse project.

| Metric | [gofiber/fiber](https://octocounts.com/github/gofiber/fiber) | [gin-gonic/gin](https://octocounts.com/github/gin-gonic/gin) |
| --- | ---: | ---: |
| Files | 331 | 109 |
| Total lines | 166,877 | 23,588 |
| Code lines | 118,932 | 16,080 |
| Comment lines | 23,504 | 4,065 |
| Blank lines | 24,441 | 3,443 |
| Languages counted | 3 | 7 |

Top languages in gofiber/fiber: Go (100.0% of code), Makefile (0.0% of code), Markdown (0.0% of code). Top languages in gin-gonic/gin: Go (99.3% of code), Makefile (0.5% of code), YAML (0.1% of code). Go, Makefile appear in both top language lists; Markdown appears only in gofiber/fiber's top languages; YAML, Protocol Buffers, Templ appear only in gin-gonic/gin's top languages.

Methodology: both counts come from cached OctoCounts reports generated with tokei. gofiber/fiber was counted at ref 9d417a3cad7ab3d2c7988a2e3a8468b0835e1c8c (commit 9d417a3cad7a) on 2026-09-15; gin-gonic/gin was counted at ref 45b805f6d59ba0b4f315adffe81ed4a82a51a591 (commit 45b805f6d59b) on 2026-09-15. See the [counting methodology](https://octocounts.com/docs/methodology) for ignored directories and analysis options.
## About this comparison

gofiber/fiber counts the Fiber repository: a Go web framework built on the fasthttp HTTP engine (a separate dependency, not part of this count), with in-tree middleware and tests. gin-gonic/gin counts the Gin repository — a Go web framework built on Go's standard net/http facilities, also with in-tree middleware and tests. Both are Go web-framework cores of the same kind, counted on the dates in the methodology line.

Each per-language table is essentially one row of Go: both frameworks are implemented in their entirety in Go, so this comparison reads as two same-language, same-purpose trees measured side by side.

Both repositories include their middleware collections in the core repo rather than in separate ones, so each total reflects the framework plus the commonly shipped middleware surface, not the routing core alone.

_Framework source size says nothing about request throughput or latency: Fiber's and Gin's runtime behavior is shaped by the HTTP engine underneath them (fasthttp versus the standard library), and neither engine's code appears in these counts._

Sources: [gofiber/fiber repository](https://github.com/gofiber/fiber) · [gin-gonic/gin repository](https://github.com/gin-gonic/gin). Statements verified 2026-09-16.

Evidence and next steps:

- [gofiber/fiber SLOC report](https://octocounts.com/github/gofiber/fiber)
- [gin-gonic/gin SLOC report](https://octocounts.com/github/gin-gonic/gin)
- [Compare gofiber/fiber and gin-gonic/gin interactively](https://octocounts.com/compare?left=https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber&right=https%3A%2F%2Fgithub.com%2Fgin-gonic%2Fgin)

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, gofiber/fiber or gin-gonic/gin?

gofiber/fiber has more code: 118,932 code lines versus 16,080 for gin-gonic/gin, about 7.4x as much, based on cached OctoCounts reports as of 2026-09-15.

### 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 gofiber/fiber, gin-gonic/gin, or any repository.

### How is this comparison calculated?

Methodology: both counts come from cached OctoCounts reports generated with tokei. gofiber/fiber was counted at ref 9d417a3cad7ab3d2c7988a2e3a8468b0835e1c8c (commit 9d417a3cad7a) on 2026-09-15; gin-gonic/gin was counted at ref 45b805f6d59ba0b4f315adffe81ed4a82a51a591 (commit 45b805f6d59b) on 2026-09-15. 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)
