CLI tool
gofiber/fiber avatar
gofiber/fiber

Fiber: Express-Inspired Go Web Framework Built on Fasthttp

Project brief: Express inspired web framework written in Go. Fiber is an Express inspired web framework built on top of Fasthttp , the fastest HTTP engine for Go .

40,186 stars2,042 forksGoMIT

At a glance

What is it?
Fiber is an MIT-licensed Go web framework that mirrors the Express API for developers coming from Node.js. It is built on Fasthttp rather than the standard library's net/http, and its zero-allocation design means values from the request context must not be kept after the handler returns.
Who is it for?
Node.js developers who are learning Go and want an API that feels familiar to Express should find Fiber a practical entry point. The zero-allocation design produces high throughput but requires discipline: any value taken from fiber.Ctx must be used within the handler and not stored elsewhere.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What Fiber Is and Who It Targets

Fiber is a Go web framework that ports the Express API to Go. The README states that new gophers making the switch from Node.js to Go face a learning curve before they can build web applications, and Fiber was created to reduce that barrier by providing an API that developers familiar with Express or similar frameworks will recognize immediately.

The primary audience is developers who know Express and are adopting Go, or teams that want Express-style routing and middleware conventions in a Go service. The README describes the framework as following the UNIX way and minimalism principles. Go's performance and the Express-style API are the combination the framework offers. The go.mod file at the root of the repository shows the module path as github.com/gofiber/fiber/v3, with Go 1.26 as the minimum version requirement. Version 3 is the current major series; v2.52.15 is also maintained alongside it.

Fasthttp Foundation and Zero Allocation

Unlike most other Go web frameworks, Fiber does not wrap Go's standard net/http package. It is built directly on Fasthttp, a third-party HTTP engine listed in go.mod as github.com/valyala/fasthttp v1.74.0. The README describes Fasthttp as the fastest HTTP engine for Go. This choice has a direct consequence that the README emphasizes: the zero-allocation design.

Values returned from fiber.Ctx, the request context object, are not immutable by default and will be reused across requests. The README states as a rule of thumb: you must only use context values within the handler and must not keep any references. Once you return from the handler, any values obtained from the context will be reused in future requests. This is a deliberate performance decision to avoid heap allocations on each request, but it is a source of subtle bugs when developers familiar with net/http assume the context values are safe to store. The documentation at docs.gofiber.io/#zero-allocation covers which specific values are affected and how to safely copy them when persistence across goroutines is needed.

Installing and Writing a First Fiber App

Fiber requires Go 1.26 or higher. The setup starts with initializing a Go module and installing the package:

bash
go mod init github.com/your/repo
go get -u github.com/gofiber/fiber/v3

The README provides a minimal complete example that starts a server responding on the root path:

go
package main

import (
    "log"
    "github.com/gofiber/fiber/v3"
)

func main() {
    app := fiber.New()
    app.Get("/", func(c fiber.Ctx) error {
        return c.SendString("Hello, World!")
    })
    log.Fatal(app.Listen(":3000"))
}

Running this program and visiting http://localhost:3000 returns the response. The three concepts in this example are app initialization, route definition with app.Get(), and server startup with app.Listen(). These mirror the Express pattern of express(), app.get(), and app.listen() directly.

Routing, Middleware, and Supported Features

Fiber's feature list from the README covers the most common web framework needs: routing, static file serving, middleware support, rate limiting, and server-sent events. WebSocket support is available through the gofiber/template repository, and Socket.io support is documented in the contrib/socketio reference. The README lists template engines and WebSocket support as part of the broader ecosystem around the core framework.

The middleware directory in the repository contains built-in middleware including a rate limiter (middleware/limiter) and SSE (middleware/sse). The go.mod file includes github.com/gofiber/schema and github.com/gofiber/utils/v2 as direct dependencies, which handle request parsing and utility functions. The Makefile defines targets for testing (go test with race detection and shuffle enabled), benchmarking, linting with golangci-lint v2, and coverage reporting. The test suite uses gotest.tools/gotestsum and runs with -race to catch data races. The addon/ directory in the repository provides extension points for features that are not part of the core.

The net/http Incompatibility

The Fasthttp foundation means that Fiber is incompatible with Go's standard net/http ecosystem. Middleware libraries that accept http.Handler or http.HandlerFunc cannot be used directly with Fiber handlers. The README acknowledges this in the philosophy section without framing it as a limitation: the framework was built for Express-style development, not for compatibility with the net/http interface.

For teams that need to integrate third-party Go middleware that targets net/http, there is an adapter mechanism documented in the repository (adapter.go is listed in the top-level files), but the primary experience is using Fiber-native middleware from the middleware/ directory or from the broader gofiber ecosystem. Teams who have existing Go infrastructure built around net/http and want to add Fiber services alongside it need to be aware that the two HTTP engines do not share handler interfaces.

Fiber vs Gin: Two Express-Inspired Approaches

Gin is the other widely used Express-inspired Go web framework. The fundamental architectural difference is the HTTP engine underneath: Gin wraps Go's standard net/http, while Fiber wraps Fasthttp. This difference affects compatibility more than raw API design: Gin handlers can be layered on top of standard library handlers and middleware, while Fiber cannot.

Both frameworks use similar routing syntax. Gin uses gin.Context for the request context; Fiber uses fiber.Ctx. The zero-allocation constraint is specific to Fiber and does not apply to Gin, since Gin does not reuse context values across requests in the same way. Teams who need to integrate heavily with the Go standard library ecosystem and net/http-based packages should use Gin. Teams optimizing for throughput and familiar with Express who do not need net/http compatibility have a reason to evaluate Fiber.

Versioning, License, and What to Check Before Adopting

Fiber is licensed under MIT, which permits commercial use and modification. The go.mod file declares Go 1.26.0 as the minimum version, which means older Go toolchains are not supported. The repository received its last push on 2026-09-28 and is not archived. Version 3.5.0 is the latest v3 release, published 2026-08-13. Version 2.52.15 is the latest v2 release, published 2026-08-12, indicating that both major versions are receiving maintenance.

The Makefile includes an audit target that runs go mod verify, go vet, and govulncheck, which is relevant for teams who need to verify dependency integrity. The go.sum file is present and tracks dependency checksums. Before upgrading from v2 to v3, teams should check the documentation for breaking API changes, as the module path and context type changed between major versions. The repository's AGENTS.md and .github/ directory suggest the project uses automated contribution tooling.

Editorial conclusion

Node.js developers who are learning Go and want an API that feels familiar to Express should find Fiber a practical entry point. The zero-allocation design produces high throughput but requires discipline: any value taken from fiber.Ctx must be used within the handler and not stored elsewhere. Teams who need full compatibility with Go's standard net/http ecosystem, including middleware libraries that target http.Handler, should use Gin or the standard library instead, since Fiber's Fasthttp foundation is not net/http-compatible. Before using Fiber in production, read the zero-allocation documentation at docs.gofiber.io/#zero-allocation to understand which context values are reused across requests.

Frequently asked questions

What is Fiber in Go web development?

Fiber is a Go web framework inspired by Express, built on Fasthttp rather than the standard net/http library. It provides routing, middleware, WebSocket support, and a context API designed to feel familiar to developers who know Express.

Does Fiber work with standard Go net/http middleware?

No. Fiber is built on Fasthttp, which is not compatible with the standard net/http handler interface. Middleware that accepts http.Handler or http.HandlerFunc cannot be used directly with Fiber without an adapter.

Why does Fiber warn about not keeping fiber.Ctx values?

Fiber reuses context values across requests to avoid heap allocations. The README states that values obtained from fiber.Ctx must only be used within the handler and must not be referenced after the handler returns, because those values will be overwritten when the next request uses the same slot.

What Go version does Fiber v3 require?

Fiber v3 requires Go 1.26 or higher, as declared in go.mod. The latest v3 release is v3.5.0, published on 2026-08-13.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
  4. Release notes
For maintainers

Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/gofiber-fiber.svg)](https://hysenlabs.com/projects/gofiber-fiber)
Community notes

Community notes