echo README

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

Latest release Last commit Sourcegraph GoDoc Go Report Card GitHub Workflow Status (with event) Codecov Forum Twitter License

Echo

High performance, extensible, minimalist Go web framework.

Echo is built on Go's standard net/http — and interoperates with it via echo.WrapHandler / echo.WrapMiddleware — adding the parts the standard library leaves to you: a fast radix-tree router, request binding (with a pluggable validator), a deep middleware ecosystem, and centralized error handling. Actively maintained, with v5 as the current release line (see badges above for the latest version and most recent commit).

Help and questions: Github Discussions

Feature Overview

Sponsors

encore icon Encore – the platform for building Go-based cloud backends

Click here for more information on sponsorship.

Guide

Supported Echo versions

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

Installation

// go get github.com/labstack/echo/{version}
go get github.com/labstack/echo/v5

Latest version of Echo supports last four Go major releases and might work with older versions.

Example

package main

import (
  "github.com/labstack/echo/v5"
  "github.com/labstack/echo/v5/middleware"
  "log/slog"
  "net/http"
)

func main() {
  // Echo instance
  e := echo.New()

  // Middleware
  e.Use(middleware.RequestLogger()) // use the RequestLogger middleware with slog logger
  e.Use(middleware.Recover())       // recover panics as errors for proper error handling

  // Routes
  e.GET("/", hello)

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

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

Official middleware repositories

Following list of middleware is maintained by Echo team.

Repository Description
github.com/labstack/echo-jwt JWT middleware
github.com/labstack/echo-contrib casbin, gorilla/sessions, pprof) middlewares
github.com/labstack/echo-opentelemetry OpenTelemetry middleware for tracing and metrics
github.com/labstack/echo-prometheus Prometheus middleware for Echo

Third-party middleware repositories

Be careful when adding 3rd party middleware. Echo teams does not have time or manpower to guarantee safety and quality of middlewares in this list.

Repository Description
oapi-codegen/oapi-codegen Automatically generate RESTful API documentation with OpenAPI Client and Server Code Generator
github.com/swaggo/echo-swagger Automatically generate RESTful API documentation with Swagger 2.0.
github.com/ziflex/lecho Zerolog logging library wrapper for Echo logger interface.
github.com/brpaz/echozap Uber´s Zap logging library wrapper for Echo logger interface.
github.com/samber/slog-echo Go slog logging library wrapper for Echo logger interface.
github.com/darkweak/souin/plugins/echo HTTP cache system based on Souin to automatically get your endpoints cached. It supports some distributed and non-distributed storage systems depending your needs.
github.com/mikestefanello/pagoda Rapid, easy full-stack web development starter kit built with Echo.
github.com/go-woo/protoc-gen-echo ProtoBuf generate Echo server side code

Please send a PR to add your own library here.

Contribute

Use issues for everything

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, go-zero, Slim, chi, gofr, hono
Creator
labstack
Size
6.6 MB
Stars
32.8K
Age
11y
Commits · 90 Days