OpenAPI Spec Validator
Validate an OpenAPI or Swagger specification and catch the errors that pass validation but break generated clients.
Need this built for your product?
We design, build & host secure software & APIs.
Valid is a low bar
A specification can satisfy the JSON Schema for OpenAPI and still be nearly useless. Validation confirms structure: required fields present, types correct, references resolvable. It says nothing about whether the spec describes what the API actually does, whether the examples work, or whether a generated client will function. Most of the real problems sit above the validator's reach.
Version differences that bite
Swagger 2.0 and OpenAPI 3.x are structurally different, not cosmetically. Bodies moved from a parameter with in: body to a dedicated requestBody. definitions became components/schemas. Host, basePath and schemes collapsed into a servers array. Tools frequently accept both and behave differently, so a spec converted by a machine and never reviewed often carries fragments of the old shape that validate and mislead.
Unresolvable and circular references
A $ref pointing at a missing definition or an external file that has moved fails at generation rather than validation in some tooling. Circular references are legal and represent genuine recursive structures, but many code generators either loop forever or silently truncate the type. If a generated client is missing a nested field, a circular reference is a likely cause.
Undocumented responses are the common gap
Specs routinely document 200 and nothing else. Generated clients then have no type for the error body, and consumers write their own guesses. Every status code the API can return, with its schema, belongs in the spec — particularly 400, 401, 403, 404 and 422, since those are the ones client code has to handle.
Examples must be real
Hand-written examples drift from the schema and from the implementation, and nothing catches it unless examples are validated against their own schema. An example that contradicts its schema is worse than none, because documentation readers trust it and build against it. Generating examples from the schema, or validating them in CI, keeps them honest.
Generate the spec, or verify it against the code
A specification maintained by hand alongside an implementation diverges — not gradually, but at the first hurried change. Either generate it from code annotations, or run contract tests that exercise the real API against the spec in CI. A spec nobody verifies describes the API as somebody once intended it, which is the state most public API documentation is in.
Frequently Asked Questions
Privacy & Security
Validation done locally.
About This Tool
This tool runs entirely in your browser. No data is sent to any server, ensuring complete privacy. Simply use the interface above to get started — no registration or login required.
Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.
Related Tools
JSON Formatter
DeveloperFormat and beautify JSON in your browser. Pinpoints syntax errors by line and column, flags unsafe integers, and never uploads your data to a server.
JSON Validator
DeveloperValidate JSON syntax with precise line and column errors, and check documents against a JSON Schema. Runs locally in your browser, nothing uploaded.
Regex Tester
DeveloperTest regular expressions against sample text with live match highlighting, capture groups and flag control. Runs entirely in your browser.