40,260
stars
+7
2,072
forks
281
watchers
3,021
prs
1,757
issues
145
releases
0
discussions
README
Fiber is an Express inspired web framework built on top of Fasthttp, the fastest HTTP engine for Go. Designed to ease things up for fast development with zero memory allocation and performance in mind.
---
Tool Sponsors - supporting Fiber with free IDE licenses and AI credits
---
⚙️ Installation
Fiber requires Go version 1.26 or higher to run. If you need to install or upgrade Go, visit the official Go download page. To start setting up your project, create a new directory for your project and navigate into it. Then, initialize your project with Go modules by executing the following command in your terminal:
bash
go mod init github.com/your/repo
To learn more about Go modules and how they work, you can check out the Using Go Modules blog post.
After setting up your project, you can install Fiber with the go get command:
bash
go get -u github.com/gofiber/fiber/v3
This command fetches the Fiber package and adds it to your project's dependencies, allowing you to start building your web applications with Fiber.
🚚 Migrate
Coming from Fiber v2? The Fiber CLI can migrate your project to v3 for you. Install it, then run the migrate command in your project's directory:
bash
go install github.com/gofiber/cli/fiber@latest
fiber migrate --to v3
Review the changes and run your tests afterwards. Run fiber migrate --help to see all options, and see the migration guide for what changed in v3.
⚡️ Quickstart
Getting started with Fiber is easy. Here's a basic example to create a simple web server that responds with "Hello, World 👋!" on the root path. This example demonstrates initializing a new Fiber app, setting up a route, and starting the server.
go title="Example"
package main
import (
"log"
"github.com/gofiber/fiber/v3"
)
func main() {
// Initialize a new Fiber app
app := fiber.New()
// Define a route for the GET method on the root path '/'
app.Get("/", func(c fiber.Ctx) error {
// Send a string response to the client
return c.SendString("Hello, World 👋!")
})
// Start the server on port 3000
log.Fatal(app.Listen(":3000"))
}
This simple server is easy to set up and run. It introduces the core concepts of Fiber: app initialization, route definition, and starting the server. Just run this Go program, and visit http://localhost:3000 in your browser to see the message.
Zero Allocation
Fiber is optimized for high-performance, meaning values returned from fiber.Ctx are not immutable by default and will be reused across requests. 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. Visit our documentation to learn more.
🤖 Benchmarks
These tests are performed by TechEmpower. If you want to see all the results, please Top issues
#2347🚀 [Feature]: allow to automatically generate OpenAPI docs based on route details, without additional in-code comments14 comments · 2023-02-27#3419📝 [Proposal]: Seperate router13 comments · 2025-04-22#2487🚀 [Feature]: Ability to change param values13 comments · 2023-05-30#3221Implement Fluent Method Chaining for Status and Type Methods Using Generics12 comments · 2024-11-29#4604Consolidate sanitization/normalization helpers and remove double processing11 comments · 2026-08-11#3367📝 [Proposal]: Always return immutable string and deprecate the `Immutable` flag11 comments · 2025-03-22#3429🤗 [Question]: Missing Error Details in Query Parser for Custom Types7 comments · 2025-04-29#4563v4: stop implementing context.Context on Ctx5 comments · 2026-07-28
Latest release
v3.6.1 v3.6.1 2026-10-14🧹 Updates - Consolidate media-type parameter parsing into internal/mediatype (4750) - Fix modernize and revive lint issues (4759) 🐛 Fixes - Fix client, session, basicauth and other bugs found in the audit (4752) 🛠️ Maintenance - bump github.com/gofiber/utils/v2 from 2.6.1 to 2.6.2 (4760) - bump github.com/klauspost/compress from 1.20.1 to 1.20.3 (4757) - bump github.com/molecule-man/go-brrr from 1.2.0 to 1.3.0 (4758) - bump the golang-modules group with 3 updates (4755) - bump release-drafter/release-drafter from 7.9.0 to 7.10.0 (4756) - bump actions/setup-node from 7.0.