OpenAPI & Swagger Validator

Paste an API specification to check it against the official OpenAPI schema, catch broken references and inconsistent path parameters, and see every endpoint at a glance.

Runs in your browserUpdated
Open file (.yaml, .json)

Your data never leaves your computer. All processing happens 100% locally in your browser.

How to use the OpenAPI / Swagger Validator

  1. Paste your openapi.yaml / swagger.json or open the file.
  2. The version (OpenAPI 3.1, 3.0 or Swagger 2.0) is detected automatically.
  3. Fix schema errors first — each shows its location in the document.
  4. Review the additional checks and the endpoint list.

What gets checked

CheckDetails
Official schemaThe document is validated against the OpenAPI Initiative’s JSON Schema for its version (3.1, 3.0 or Swagger 2.0): required fields, allowed keys, value types
Broken $refEvery local reference (#/components/schemas/Pet) must point to something that exists
Unique operationIdDuplicates break SDK generators and documentation links
Path parametersEvery {param} in a path must be declared with in: path and required: true, and vice versa
ResponsesEach operation needs at least one response
HintsMissing operationId, servers or info.description

OpenAPI versions

  • Swagger 2.0 — swagger: "2.0", definitions, host/basePath.
  • OpenAPI 3.0 — components, servers, requestBody; schemas are a JSON Schema draft-04 subset with nullable.
  • OpenAPI 3.1 — fully aligned with JSON Schema 2020-12 (type: [string, "null"] instead of nullable), adds webhooks.

Limits

External references to other files or URLs are not fetched — bundle multi-file specs first (for example with redocly bundle). Schema validation reports structural problems; style rules such as naming conventions need a linter like Spectral. Validate example payloads against your schemas with the JSON Schema validator, check YAML syntax with the YAML validator, and try the live API with the API tester.

Tools that pair well with the OpenAPI / Swagger Validator

  • JSON Formatter — Paste JSON to pretty-print, minify or validate it.
  • cURL to Code — Paste a curl command — from API docs or “Copy as cURL” in your browser’s DevTools — and get ready-to-run code for six languages, with headers, body and authentication carried over.
  • JSONPath Tester — Type a JSONPath query and instantly see what it selects — with the exact path of each match.
  • JSON to YAML — Paste JSON and get clean YAML for Kubernetes manifests, Docker Compose, GitHub Actions or any config file.

Frequently asked questions

Does it support OpenAPI 3.1?
Yes — OpenAPI 3.1.x, 3.0.x and Swagger 2.0 are each validated against their official schema.
Why are there so many errors for one mistake?
The official schemas use alternatives (oneOf), so one wrong value can fail several branches. The tool filters these down to the most specific messages; fix the first one and re-check.
Can it follow $refs to other files?
No, only references within the same document. Bundle multi-file specs into one file first.
Is my API spec uploaded?
No. Validation runs entirely in your browser, so internal API designs stay private.

Related tools