Back to all tools

OpenAPI / Swagger Validator

Validate OpenAPI 3.x and Swagger 2.x specs. Paste JSON or YAML to check structure, browse endpoints, and inspect components.

What is OpenAPI?

OpenAPI (formerly Swagger) is a specification for describing RESTful APIs in a machine-readable format. An OpenAPI document describes endpoints, request/response schemas, authentication methods, and more. Tools can read these documents to generate client SDKs, documentation, mock servers, and tests automatically.

OpenAPI 3.0+ is the current standard. Swagger 2.0 is the older format still used by many APIs. This tool validates both.

How to Use This Validator

  1. Choose format — Select YAML or JSON depending on your spec format.
  2. Paste your spec — Paste the full OpenAPI document into the textarea.
  3. Review validation — Errors and warnings are shown with field paths for easy navigation.
  4. Browse endpoints — See all your API operations in a clean table with method badges and tags.

Common Use Cases

Frequently Asked Questions

What is the difference between OpenAPI 3.x and Swagger 2.0?

OpenAPI 3.0 is a major revision of Swagger 2.0. Key differences: OpenAPI 3.x uses "openapi" as the version field, restructures server URLs (servers array instead of host/basePath), supports multiple request body types, and has a more flexible components section. Swagger 2.0 uses the "swagger" field and is identified by version "2.0".

What are the required fields in an OpenAPI 3.x spec?

The minimum required fields are: "openapi" (version string like "3.0.0"), "info" (with "title" and "version" sub-fields), and "paths" (an object mapping URL paths to operations). Everything else — servers, components, security schemes — is optional.

Can I validate a private or internal API spec?

Yes. This validator runs entirely in your browser using JavaScript. Your spec is never sent to any server, making it safe to use with proprietary or internal API specifications.