Go web framework built on Fasthttp with Express-like routing, middleware, and JSON helpers. Targets fast APIs with a small memory footprint.
Overview
Fiber is a Go web framework modeled after Express, sitting on the Fasthttp engine for HTTP performance. It is aimed at developers who want familiar routing and middleware patterns while staying in the Go ecosystem.
Applications declare routes with HTTP verbs and path parameters, chain middleware for logging, rate limits, security headers, CORS, sessions, and more. Built-in helpers cover JSON responses, static files, server-side templates, WebSockets, server-sent events, and request binding into structs.
The router can adapt net/http handlers and Express-style callbacks for incremental migration. An official ecosystem adds storage drivers, template engines, and contrib packages for auth, tracing, metrics, and API documentation.
Fiber requires a recent Go toolchain and documents zero-allocation patterns where context values are reused per request. TechEmpower-style benchmarks are published for comparison with other Go HTTP frameworks.
Key features
- Express-like routing API
- Rich built-in middleware
- JSON bind and respond
- Static file serving
- WebSocket and SSE support
- net/http handler adaptor
- View template engines
- Built-in HTTP client
Use cases
- REST APIs in Go
- Microservices behind reverse proxies
- Migrating from Express patterns
- High-throughput JSON services
- Server-rendered HTML apps