Skip to main content
API & Developer Testing Tools

OpenAPI / Swagger Validator

Paste an OpenAPI 3.x document in JSON or YAML and check it against the common required structure - info, paths, and version fields.

Paste an OpenAPI (or Swagger 2.0) document in JSON or YAML below to check it against the common required structure.

This checks the OpenAPI 3.x document structure that most tooling relies on (info, paths, valid version, response objects, and similar common requirements) - it is not a byte-for-byte implementation of the full OpenAPI specification, so it will not catch every possible edge case.

This checks the structure most tooling relies on (version field, info, paths) rather than performing full JSON Schema validation against the entire OpenAPI specification.

What Is OpenAPI/Swagger?

OpenAPI (formerly known as Swagger) is a specification format for describing a REST API - its endpoints, request/response shapes, and authentication - in a single machine-readable JSON or YAML document, which tools can then use to generate documentation, client code, or test suites.

Why Use This Tool?

Useful for catching structural mistakes in a hand-written or generated OpenAPI document before feeding it into documentation or code-generation tooling that would otherwise fail with a less helpful error.

How to Use the OpenAPI Validator

  1. Paste your OpenAPI or Swagger document as JSON or YAML - the format is detected automatically.
  2. Click Validate to see the result.

What Is Checked

The document must parse as valid JSON/YAML, declare an openapi (3.x) or swagger (2.0) version string, and include an info object with a title and version, plus a paths object. Each path item is checked for at least one valid HTTP method.

Limitations

This checks the common structural requirements most tooling depends on - it is not a full validation against the complete OpenAPI JSON Schema, and passing this check does not guarantee full specification compliance.

Related Tools

Use the OpenAPI to JSON Converter or OpenAPI to YAML Converter to switch formats, or the JSON Formatter and JSON Validator for general JSON work.

Frequently Asked Questions

OpenAPI 3.x documents (for example 3.0.3 and 3.1.0), written in JSON or YAML. Swagger 2.0 files use a different top-level structure ("swagger": "2.0") and are not validated here.

It checks the required top-level structure - the openapi version, the info object with title and version, and paths. It is a quick structural check, not a full validation of every schema, parameter and $ref.

Full validators also check deeper rules such as parameter definitions, response schemas and unresolved $ref links. Use a dedicated OpenAPI linter for a complete check before publishing.
Share this tool: