Redoc

Open-source tool from Redocly that generates beautiful API reference documentation from OpenAPI (formerly Swagger) definitions. Default output is a responsive three-panel layout: navigation + search on the left, docs in the centre, request/response examples on the right.

Description

  • Generates a static, responsive API reference from an OpenAPI/Swagger spec.
  • Supports OpenAPI 3.1, OpenAPI 3.0, and Swagger 2.0.
  • Three delivery modes: CLI (also a Docker image), an HTML <redoc> tag loaded from CDN, and a React component (simple create-react-app integration).
  • Live demo / playground: paste a spec URL and render it at redocly.github.io/redoc.

Download or use

# CLI (requires Node) — outputs redoc-static.html
npx @redocly/cli build-docs openapi.yaml
<!-- HTML tag from CDN -->
<redoc spec-url="http://petstore.swagger.io/v2/swagger.json"></redoc>
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"></script>

Reasoning for

When an API already has an OpenAPI/Swagger spec, Redoc turns it into publishable reference docs with zero hand-written HTML — useful for any project exposing a documented API. It reads spec extensions (x-logo, x-tagGroups, x-codeSamples, x-badges, etc.) so the docs can be branded and grouped without leaving the spec file.

Alternatives considered

  • Swagger UI — the classic OpenAPI renderer; single-panel, interactive try-it console out of the box.
  • Redocly API Reference — Redocly’s paid hosted edition, adds a try-it console, automated code samples, pagination, and extra themes on top of the community Redoc.
  • Redocly CLI — the broader sibling toolchain (linting, bundling) around the same specs.

Resources


Template: tool