OpenAPI Validator
Validate OpenAPI 3.0 and 3.1 specifications (YAML or JSON) instantly in your browser. Checks required fields, path structure, operation responses, and displays spec summary. 100% client-side.
How to Use
- Paste your OpenAPI spec (YAML or JSON) into the editor.
- Click Validate or press Ctrl+Enter.
- If valid, a summary panel shows the API title, version, path count, and operation count.
- If invalid, each error is listed with its JSON path and a description.
Required OpenAPI 3.x Fields
openapi— version string, e.g.“3.0.3”or“3.1.0”info.title— human-readable API nameinfo.version— API version, e.g.“1.0.0”paths— map of path item objects; each key must begin with/
Common Mistakes
- Using Swagger 2.x format (
swagger: “2.0”) instead of OpenAPI 3.x — migrate by replacingswaggerwithopenapi: “3.0.3”and updatingdefinitionstocomponents/schemas. - Missing
responsesobject inside an operation — every operation must declare at least one response. - Path keys that do not begin with
/— all paths must be absolute, e.g./users/{id}. - YAML indentation errors — use the YAML Validator to fix syntax issues first.
FAQ
What OpenAPI versions does this tool support?
The validator supports OpenAPI 3.0.x and 3.1.x specifications. Swagger 2.x (OpenAPI 2.0) documents will show a version warning with a migration tip.
Can I validate YAML and JSON specs?
Yes. Paste either YAML or JSON — the tool auto-detects the format and parses it before validation.
What does the validator check?
Required top-level fields (openapi, info, paths), info object fields (title, version), path format (must start with /), and that each operation has a responses object.
Is my API spec sent to any server?
No. All validation runs entirely in your browser using JavaScript. Nothing is transmitted to any server.
What are the required fields in an OpenAPI 3.x document?
openapi (version string), info.title, info.version, and paths. The servers, components, tags, and externalDocs fields are optional.