Gin is a HTTP web framework written in Go (Golang). It features a martini-like API but performs much faster — up to 40 times faster thanks to httprouter. Gin uses a radix tree-based routing system, supports middleware, JSON validation, route grouping, and rendering for JSON, XML, HTML, and protobufs.
It is one of the most popular Go web frameworks for building REST APIs and microservices.
HTTP web framework written in Go. Fast, performant, minimalist — radix tree router and ergonomic API.
✨ Features
Tree-based router with zero allocation. Lookup is constant time regardless of route count.
Logger, recovery, JWT, CORS, sessions — install with one line, apply per group.
go-playground/validator integration. Struct tags declare constraints, errors surface uniformly.
JSON, XML, YAML, HTML templates, protobuf — pick the format per response.
One of the fastest Go web frameworks. Consistently near the top of benchmark roundups.