echo README

The project's README from github.com/labstack/echo. As one markdown file: README.md.

Echo

High performance, extensible, minimalist Go web framework.

Latest release Last commit Go Reference CI Codecov OpenSSF Scorecard Sponsors Discussions X License

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

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 logo Blacksmith: faster, drop-in GitHub Actions runners
Encore logo Encore: the platform for building Go-based cloud backends
Gravity Carbon logo Gravity Carbon

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

Getting started

Supported versions

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

Security

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

Credits

License

MIT

echo (labstack/echo)

Searching Database…

32.8K ·GitHub
What is this?Echo is a high performance, minimalist web framework for Go, used to build web apps, RESTful APIs and microservices.
Is it a framework or a library, and how does it sit with Go's standard net/http?It's a framework built on Go's standard net/http and interoperates with it — existing handlers and middleware plug in via echo.WrapHandler and echo.WrapMiddleware.
How do I add it to a project?Add the Echo module to your project with go get, like any Go dependency, then follow the Quick start guide on the official website — nothing else to install.
Which Go versions does it support?The latest Echo release supports the last four Go major releases and might work with older versions too.
Should I start with v4 or v5?Start with v5 — it's the current line as of January 2026. v4 only gets security updates and bug fixes until December 31, 2026, and the v4-to-v5 API changes are listed in APICHANGESV5.md.
Can I use it in commercial projects?Yes — Echo is MIT-licensed, so commercial use, modification and redistribution are all fine.
Does it handle HTTPS and HTTP/2 for me?Yes. Echo supports automatic TLS certificates via Let's Encrypt and has built-in HTTP/2 support, so you don't need a separate proxy just to serve secure traffic.
Is there a ready-made starter kit for full-stack apps?Yes — Pagoda, a third-party project listed in the README, is a rapid and easy full-stack web development starter kit built with Echo.
Can I generate API documentation from my code?Through third-party middleware: oapi-codegen generates OpenAPI client and server code, and swaggo/echo-swagger produces Swagger 2.0 documentation for REST APIs.
How mature is the project?Very — developed since March 2015 with over 32,000 GitHub stars, actively maintained with v5 as the current release line, and sponsored by platforms like Encore.
What are similar projects?actix-web, iris, fiber, Slim, go-zero, chi, gofr, hono
Creator
labstack
Size
6.8 MB
Stars
32.8K
Age
11y
Commits · 90 Days