Expose your internal gRPC service as a REST API for web browsers and third-party integrations without rewriting your backend.
Generate OpenAPI documentation automatically from your gRPC service definition to share with API consumers.
Run a single backend that serves both high-performance gRPC clients internally and standard REST clients externally.
Add HTTP endpoints to an existing gRPC service by annotating your protobuf definitions and regenerating the proxy.
Requires Go runtime and protoc compiler; needs to generate code from .proto files before running.
gRPC-Gateway is a code generation tool that automatically creates a traditional REST (JSON over HTTP) API from a gRPC service definition, letting you offer both communication styles from the same backend without writing two separate servers. To understand why this matters: gRPC is a high-performance remote procedure call system developed by Google that uses a compact binary format and generated code for tight client-server contracts. It is fast and efficient but requires clients that speak the gRPC protocol. REST APIs using JSON are the far more universal standard, supported by web browsers, curl, and virtually every HTTP library. Many teams want gRPC internally for speed and type safety, but also need a standard REST interface for external consumers, third-party integrations, or web frontends. gRPC-Gateway solves this by reading your service's protobuf definition files (the schema files gRPC uses) and generating a reverse-proxy server in Go. You add special HTTP annotations to your protobuf definitions specifying how each gRPC method should map to HTTP endpoints, paths, and query parameters, and the tool generates the proxy code that translates incoming REST calls into gRPC calls and converts gRPC responses back to JSON. It also generates OpenAPI (Swagger) documentation automatically. The setup involves installing a few code generation plugins and running the protobuf compiler against your service definition. The generated proxy can then run alongside your gRPC server. This is a Go project used by organizations serving millions of API requests per day that want to maintain both a high-performance internal gRPC interface and a broadly compatible REST API without duplicating server logic.
Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.