OpenAPI & Swagger Validator and Viewer

Paste a spec to find errors and get a readable list of every endpoint. Works with OpenAPI 3.0, 3.1 and Swagger 2.0 in YAML or JSON. Free, and everything runs in your browser.

What the validator checks

Each result shows a severity, a message and the path to the problem in your spec.

AreaChecks
StructureThe openapi or swagger version field, info.title, info.version and the paths object
Paths and operationsPaths start with /, no two paths differ only by parameter name, valid HTTP methods, unique operationId values
ParametersValid name and in, no duplicates, every {placeholder} in a path is declared and marked required
ResponsesAt least one response, valid status codes (200, 4XX, default) and the required description
Request bodiesA non-empty content map, and a warning for bodies on GET, HEAD and DELETE
ReferencesEvery local $ref resolves, unused components are listed, external refs are noted
SchemasValid types, arrays have items, required names exist in properties
SecurityEvery security requirement names a scheme that is defined

Errors break the spec, warnings are likely mistakes, and notes are best-practice hints.

How to use it

  1. Paste your spec, drop in a file with Open file, or pick a sample.
  2. Check the status bar. It shows whether the spec is valid and how many errors and warnings there are.
  3. Open Issues to see each problem and where it is, fix it in the editor, and watch the result update.
  4. Use Endpoints to browse operations by tag. Click one for parameters, request body and responses, or filter by path, method or summary.

Pair it with our other tools

Build a mock API

Validated spec in hand, run a mock server from it in about ten minutes.

Read the tutorial

Generate example data

Create realistic users, orders and addresses to use as example responses.

Mock Data Generator

Frequently asked questions

What is the difference between OpenAPI and Swagger?

OpenAPI is the specification for describing HTTP APIs. Swagger was its original name and is now the brand for the tools around it. Swagger 2.0 is the older version of the spec, and OpenAPI 3.0 and 3.1 are the current ones. This tool checks all three.

What does the validator check?

It checks the required top-level fields, paths and operations, parameters (including path parameters), responses and status codes, request bodies, schemas, security references, and that every local $ref points at something that exists. Each problem shows a severity and the path to it in your spec.

Does it accept YAML and JSON?

Yes. Paste either, or open a .yaml, .yml or .json file. Syntax mistakes are reported first, before any spec checks run, so you can fix them before anything else.

Is this a full OpenAPI schema validation?

No. It applies the rules that catch most real mistakes, but it does not run the complete official OpenAPI JSON Schema or follow external $ref files. For a strict CI gate, run a dedicated linter as well, and use this tool for quick feedback while you write.

Is my spec uploaded anywhere?

No. Parsing and validation run entirely in your browser, so private API definitions stay on your machine.

How does this help with a mock API?

A mock server is only as good as the spec behind it. Validate the spec here first, then follow our tutorial to run a mock from it, and use the mock data generator for realistic example values.