This OpenAPI viewer and validator reads an OpenAPI 3.0, 3.1 or Swagger 2.0 document in YAML or JSON and shows it as browsable API documentation: every endpoint grouped by tag, with its parameters, request body, responses and schemas, plus a ready-to-run cURL command. Paste the spec or open the file; nothing is uploaded, so internal and unreleased APIs stay private.
The validator runs 23 structural checks taken from the specifications, each listed on the page: info and paths present, responses with descriptions and valid status codes, every {parameter} in a path declared as a required path parameter, unique operationIds, $refs that resolve, and security requirements that name a defined scheme. These are the errors that break code generators and documentation tools. It is not a full validation against the official JSON Schema of the specification, so a spec that passes here can still have, for example, a misspelled schema keyword. External $refs to other files are listed but not fetched.
How to use
- Paste your openapi.yaml, openapi.json or swagger.json, or open the file. An example API is loaded to start.
- Read the status line and the Validation list. Each problem names the rule and where it is (for example paths./pets/{id}.get).
- Browse the documentation: operations are grouped by tag; click one to see parameters, request body, responses and schemas.
- Filter by path, summary or operationId to find an endpoint in a large spec.
- Copy the cURL example for an operation and replace the <TOKEN> or <API_KEY> placeholder with your credentials.
Frequently asked questions
How do I view a Swagger or OpenAPI file?
Paste the YAML or JSON into the box or open the file. The viewer detects the version (swagger: "2.0" or openapi: 3.0.x / 3.1.x), lists the endpoints grouped by tag and lets you expand each one to see its parameters, request body, responses and resolved schemas. It works offline once the page has loaded.
What does the OpenAPI validator check?
Structural rules from the specification: a supported version field; info with title and version; paths starting with /; operations with non-empty responses that have descriptions and valid status codes; path template parameters declared and required; parameters with name, a valid in and a schema; no duplicate parameters or operationIds; request bodies with content; $refs that resolve; and security requirements that name defined schemes. The full list is on the page under "What is checked". It does not validate every schema keyword against the official JSON Schema.
Why is my undeclared path parameter an error?
The specification requires every {name} in a path template to have a matching parameter with in: path and required: true, at the path or operation level. Some validators that only check the document against the JSON Schema accept a missing one, but code generators then produce a function with no argument for it, and documentation tools show an endpoint you cannot call correctly.
Can it read OpenAPI 3.1 and Swagger 2.0?
Yes. Swagger 2.0 body and formData parameters are shown as a request body, with produces and consumes as media types, so all three versions read the same way. OpenAPI 3.1 differences are respected: paths is optional when components or webhooks are present, responses is optional (a warning here), and type: [string, "null"] is shown as nullable.
Does it load external $ref files?
No. A $ref to another file or URL (for example ./schemas/user.yaml) is listed as a warning and shown as unresolved, because the page cannot read files you have not opened and does not fetch URLs on its own. Bundle a multi-file spec into one document first, for example with redocly bundle or swagger-cli bundle.
Is my API spec uploaded?
No. Parsing, validation and rendering run in your browser. The spec is never sent anywhere.
OpenAPI 3.x and Swagger 2.0: what changed
• Version field: swagger: "2.0" became openapi: 3.0.x, then 3.1.x.
• Servers: 2.0 has host, basePath and schemes; 3.x has a servers list with variables.
• Request bodies: 2.0 uses a parameter with in: body (or formData); 3.x has requestBody with content per media type.
• Reusable parts: 2.0 definitions, parameters and responses at the top level; 3.x puts them under components, alongside securitySchemes, requestBodies and examples.
• 3.1 aligns schemas with JSON Schema 2020-12: type can be a list (["string", "null"] instead of nullable: true), examples is an array, and webhooks are added.
The errors that most often break API tooling
• Path parameters that are not declared, or declared without required: true.
• A $ref with a typo (#/components/schema/User instead of schemas), which leaves part of the docs empty.
• Duplicate operationIds, which make code generators fail or overwrite methods.
• Responses without a description (it is required, even if it is just "OK").
• A security requirement that names a scheme which is not defined, so the generated client has no way to authenticate.
