High performance, extensible, minimalist Go web framework
๐ Quick Start โข ๐ Documentation โข ๐ฌ Community โข ๐ฏ Examples
Echo is the fastest and most feature-complete Go web framework, trusted by thousands of developers worldwide. Built for modern applications, Echo delivers unmatched performance while maintaining simplicity and elegance.
- Zero allocation router with smart route prioritization
- Blazing fast HTTP/2 and HTTP/3 support
- Memory efficient with minimal overhead
- Scales effortlessly from prototypes to production
- Intuitive API - Get productive in minutes, not hours
- Rich middleware ecosystem - 50+ built-in middlewares
- Flexible architecture - Extensible at every level
- Type-safe - Full Go type safety with generics support
- Battle-tested by companies like Encore, Docker, and GitLab
- Security first - Built-in CSRF, CORS, JWT, and more
- Observability - Metrics, tracing, and structured logging
- Cloud native - Kubernetes, Docker, and serverless ready
Get up and running in less than 60 seconds:
go mod init hello-echo
go get github.com/labstack/echo/v4
Create main.go
:
package main
import (
"net/http"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
)
func main() {
// Create Echo instance
e := echo.New()
// Add middleware
e.Use(middleware.Logger())
e.Use(middleware.Recover())
e.Use(middleware.CORS())
// Routes
e.GET("/", func(c echo.Context) error {
return c.JSON(http.StatusOK, map[string]string{
"message": "Hello, Echo! ๐",
"version": "v4",
})
})
// RESTful API example
e.GET("/users/:id", getUser)
e.POST("/users", createUser)
e.PUT("/users/:id", updateUser)
e.DELETE("/users/:id", deleteUser)
// Start server on port 8080
e.Logger.Fatal(e.Start(":8080"))
}
func getUser(c echo.Context) error {
id := c.Param("id")
return c.JSON(http.StatusOK, map[string]string{"id": id, "name": "John Doe"})
}
func createUser(c echo.Context) error {
// Bind request body
user := new(User)
if err := c.Bind(user); err != nil {
return err
}
// Validate
if err := c.Validate(user); err != nil {
return err
}
return c.JSON(http.StatusCreated, user)
}
// ... implement updateUser and deleteUser
go run main.go
# Server started on :8080
|
|
|
|
|
|
Echo's modular architecture makes it perfect for any application size:
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Middleware โโโโโโ Router โโโโโโ Handlers โ
โ โ โ โ โ โ
โ โข CORS โ โ โข Radix Tree โ โ โข REST APIs โ
โ โข Auth โ โ โข Zero Alloc โ โ โข GraphQL โ
โ โข Logging โ โ โข Path Params โ โ โข WebSockets โ
โ โข Metrics โ โ โข Wildcards โ โ โข Static Files โ
โ โข Rate Limit โ โ โข Groups โ โ โข Templates โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
Echo has a rich ecosystem of official and community packages:
Package | Description |
---|---|
echo-jwt | JWT authentication middleware |
echo-contrib | Additional middleware (Casbin, Sessions, Prometheus, etc.) |
Package | Description |
---|---|
oapi-codegen | OpenAPI 3.0 code generation |
echo-swagger | Swagger documentation |
echozap | Uber Zap logging |
slog-echo | Go slog integration |
souin | HTTP caching |
pagoda | Full-stack starter kit |
Resource | Description |
---|---|
๐ Official Documentation | Complete guide with examples |
๐ฏ Go Interview Practice | Interactive Echo challenges for skill building |
๐ผ Real-world Examples | Production-ready patterns and best practices |
๐ฅ Video Tutorials | Step-by-step video guides |
๐ฌ Community Forum | Get help and share knowledge |
Thousands of companies worldwide trust Echo to power their critical applications
We โค๏ธ contributions! Echo is built by an amazing community of developers.
- ๐ Report bugs - Help us improve by reporting issues
- ๐ก Suggest features - Share your ideas for new functionality
- ๐ Improve docs - Help others learn Echo better
- ๐ง Submit PRs - Contribute code improvements
- ๐งช Include tests - All PRs should include test coverage
- ๐ Add documentation - Document new features and changes
- โจ Include examples - Show how to use new functionality
- ๐ฌ Discuss first - Open an issue for significant changes
Get started: Check out good first issues
Echo consistently ranks as one of the fastest Go web frameworks:
Framework Requests/sec Memory Usage Latency (99th percentile)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Echo 127,271 2.3 MB 0.95ms
Gin 115,342 2.8 MB 1.2ms
Fiber 109,829 3.1 MB 1.4ms
Chi 89,234 3.5 MB 1.8ms
Gorilla Mux 45,231 4.2 MB 3.2ms
Benchmark conditions: Go 1.21, 8 CPU cores, 16GB RAM
Feature | Echo | Gin | Fiber | Chi |
---|---|---|---|---|
Performance | ๐ข Excellent | ๐ข Excellent | ๐ก Good | ๐ก Good |
Memory Usage | ๐ข Low | ๐ก Medium | ๐ก Medium | ๐ก Medium |
Middleware | ๐ข 50+ built-in | ๐ก Limited | ๐ก Growing | ๐ก Basic |
Documentation | ๐ข Comprehensive | ๐ก Good | ๐ก Growing | ๐ด Limited |
Community | ๐ข Large & Active | ๐ข Large | ๐ก Growing | ๐ก Small |
Stability | ๐ข Production Ready | ๐ข Stable | ๐ก Developing | ๐ข Stable |
- HTTP/3 support (in beta)
- OpenTelemetry integration improvements
- GraphQL middleware enhancements
- gRPC gateway support
- WebAssembly compatibility
- Advanced AI/ML middleware for intelligent routing
- Serverless optimizations for cloud platforms
- Enhanced developer tools and debugging features
Echo is released under the MIT License.
โญ Star Echo โข ๐ฆ Follow on Twitter โข ๐ผ Sponsor Development
Made with โค๏ธ by the Echo team and amazing contributors worldwide