« Back to Search  |  Reader Mode  |  Switch to Full Retro Site View Links: Stay in Reader  |  Retro Mode: ON  |  Original »
GitHub · Extracted in 665 ms

GitHub - labstack/echo: High performance, minimalist Go web framework

Source: https://github.com/labstack/echo

Repository navigation

echo
Public

About

High performance, minimalist Go web framework

echo.labstack.com

Topics

echo go http2 https labstack-echo letsencrypt micro-framework microservice middleware ssl web web-framework websocket

Resources

Readme MIT license

Security policy

Security policy Activity Custom properties

Stars

32.9k stars

Watchers

522 watching

Forks

2.9k forks Report repository
Branches

Tags
Go to Branches page Go to Tags page

Latest commit

 

History


1,976 Commits
View commit history for this file.

Folders and files

Name Name Last commit message Last commit date
.github .github    
_fixture _fixture    
echotest echotest    
middleware middleware    
.editorconfig .editorconfig    
.gitattributes .gitattributes    
.gitignore .gitignore    
.golangci.yaml .golangci.yaml    
ADOPTERS.md ADOPTERS.md    
API_CHANGES_V5.md API_CHANGES_V5.md    
CHANGELOG.md CHANGELOG.md    
CLAUDE.md CLAUDE.md    
LICENSE LICENSE    
Makefile Makefile    
README.md README.md    
ROADMAP.md ROADMAP.md    
SECURITY.md SECURITY.md    
bind.go bind.go    
bind_cache_test.go bind_cache_test.go    
bind_field_error_test.go bind_field_error_test.go    
bind_test.go bind_test.go    
binder.go binder.go    
binder_error_response_test.go binder_error_response_test.go    
binder_external_test.go binder_external_test.go    
binder_generic.go binder_generic.go    
binder_generic_test.go binder_generic_test.go    
binder_test.go binder_test.go    
codecov.yml codecov.yml    
context.go context.go    
context_generic.go context_generic.go    
context_generic_test.go context_generic_test.go    
context_test.go context_test.go    
dispatch_pool_test.go dispatch_pool_test.go    
echo.go echo.go    
echo_test.go echo_test.go    
funding.json funding.json    
go.mod go.mod    
go.sum go.sum    
group.go group.go    
group_method_handling_test.go group_method_handling_test.go    
group_test.go group_test.go    
httperror.go httperror.go    
httperror_external_test.go httperror_external_test.go    
httperror_test.go httperror_test.go    
ip.go ip.go    
ip_test.go ip_test.go    
json.go json.go    
json_test.go json_test.go    
llms-full.txt llms-full.txt    
llms.txt llms.txt    
perf_bench_test.go perf_bench_test.go    
query_fastpath_test.go query_fastpath_test.go    
renderer.go renderer.go    
renderer_test.go renderer_test.go    
response.go response.go    
response_test.go response_test.go    
rfc9457.go rfc9457.go    
rfc9457_test.go rfc9457_test.go    
route.go route.go    
route_path.go route_path.go    
route_syntax_test.go route_syntax_test.go    
route_test.go route_test.go    
router.go router.go    
router_concurrent.go router_concurrent.go    
router_concurrent_test.go router_concurrent_test.go    
router_decode_once_test.go router_decode_once_test.go    
router_test.go router_test.go    
scheme.go scheme.go    
scheme_test.go scheme_test.go    
server.go server.go    
server_test.go server_test.go    
static_encoded_separator_test.go static_encoded_separator_test.go    
static_path_security_test.go static_path_security_test.go    
version.go version.go    
vhost.go vhost.go    
vhost_test.go vhost_test.go    

Repository files navigation

High performance, extensible, minimalist Go web framework.

Website · Quick start · Middleware · API reference · Discussions · Echo Pro · Commercial support

About

Echo is built on Go's standard net/http and interoperates with it through echo.WrapHandler and echo.WrapMiddleware. It adds the parts the standard library leaves to you: a fast radix-tree router, request binding with pluggable validation, official and third-party middleware, and centralized error handling. Echo is actively maintained, and v5 is the current release line.

How a request flows

  1. Pre middleware (e.Pre) runs before routing, so it can rewrite the path or method.
  2. The router matches the route.
  3. Middleware registered with e.Use, a group or a route runs.
  4. The handler writes the response.
  5. Any error returned by middleware or the handler goes to one HTTPErrorHandler.

Features

  • Radix-tree router with static, parameter and wildcard routes; static routes match first
  • Route groups, with middleware at the root, group or route level
  • Data binding for JSON, XML, form, query and path parameters, with pluggable validation
  • Helpers for JSON, XML, HTML, file, stream and other responses
  • Centralized error handling
  • Structured request logging with log/slog
  • Template rendering with any template engine
  • TLS, HTTP/2 , Let's Encrypt certificates through autocert, and graceful shutdown

Echo Pro and support

Echo Pro is a separate commercial library from LabStack for Echo v5: API key and JWT authentication, tenant isolation, quotas with usage metering, audit records, signed webhooks and an admin console. Echo itself stays MIT, and Pro subscriptions fund its maintenance.

Echo Support is a paid annual plan for v4 and v5 applications, with a named contact and email support.

Used by

Echo runs in production across the Go ecosystem, including:

Project What runs on Echo
Bluesky indigo AT Protocol Relay and network services
Temporal UI Temporal Web UI server
NVIDIA Cloud Functions LLM API gateway
Azure Container Networking Container Networking Service REST API
osbuild-composer Red Hat Image Builder cloud API
Docker Agent Agent API, chat and A2A servers
YugabyteDB yugabyted UI API server
PostHog Livestream service
Bytebase Backend server and API
Hatchet API server
CasaOS API server
Hanko Authentication backend

See ADOPTERS.md for the full list. Using Echo in an open source project? Add it .

Sponsors

Sponsor
Blacksmith : faster, drop-in GitHub Actions runners
Encore : the platform for building Go-based cloud backends
Gravity Carbon

Echo is independent and community funded. If your company depends on Echo, please consider sponsoring it .

Getting started

Supported versions

  • v5 is the current major version, released on 2026-01-18. See API_CHANGES_V5.md for the API changes from v4 and upgrade notes.
  • v4 receives bug fixes until 2026-12-31 and security fixes until 2027-12-31, on its latest release. See SECURITY.md .

Note: Echo v4 is in maintenance and gets no new features. Start new projects on v5, and plan v4 upgrades with API_CHANGES_V5.md .

See ROADMAP.md for where Echo is heading and the version support policy.

Installation

go get github.com/labstack/echo/v5

Echo v5 supports the three most recent Go releases and may work with older ones. Echo v4 requires Go 1.26 or later.

Example

package main

import (
	"log/slog"
	"net/http"

	"github.com/labstack/echo/v5"
	"github.com/labstack/echo/v5/middleware"
)

func main() {
	e := echo.New()

	e.Use(middleware.RequestLogger()) // log requests with log/slog
	e.Use(middleware.Recover())       // recover from panics and return an error

	e.GET("/", hello)

	if err := e.Start(":8080"); err != nil {
		slog.Error("failed to start server", "error", err)
	}
}

func hello(c *echo.Context) error {
	return c.String(http.StatusOK, "Hello, World!")
}

Run it and send a request:

$ go run .
$ curl http://localhost:8080/
Hello, World!

e.Start shuts the server down gracefully on Ctrl + C .

More in the guide and the cookbook .

Middleware

Official

Maintained by the Echo team.

Repository Description
labstack/echo-jwt JWT authentication
labstack/echo-contrib Casbin , gorilla/sessions and pprof
labstack/echo-otel OpenTelemetry tracing and metrics
labstack/echo-prometheus Prometheus metrics

Third-party

Third-party middleware list

These projects are maintained by their authors, not the Echo team. Review them before use, and check which Echo version (v4 or v5) each supports.

Repository Description
oapi-codegen/oapi-codegen OpenAPI client and server code generator
swaggo/echo-swagger Serves Swagger 2.0 API documentation
ziflex/lecho Zerolog logger for Echo
brpaz/echozap Uber Zap logging middleware
samber/slog-echo log/slog logging middleware
darkweak/souin HTTP cache middleware based on Souin , with distributed storage support
mikestefanello/pagoda Full-stack web development starter kit built on Echo
go-woo/protoc-gen-echo Generates Echo server code from Protocol Buffers

To add your library, send a pull request.

Contributing

  • For a small change, send a pull request.
  • For a bigger change, open an issue to discuss it first.
  • A pull request should include tests, documentation and, where it helps, an example.

Security

Important: Report vulnerabilities privately through GitHub Security Advisories , not in public issues. See SECURITY.md for supported versions.

Credits

License

MIT

About

High performance, minimalist Go web framework

echo.labstack.com

Topics

echo go http2 https labstack-echo letsencrypt micro-framework microservice middleware ssl web web-framework websocket

Resources

Readme MIT license

Security policy

Security policy Activity Custom properties

Stars

32.9k stars

Watchers

522 watching

Forks

2.9k forks Report repository

Releases

Sponsor this project

Packages

Used by

Contributors

Languages