Skip to content

Validate and parse your OpenAPI or Swagger spec

Paste a spec, upload it with the files it references, or give us its URL. The parser checks it against the OpenAPI version it declares, points at the line behind every error, and can bundle or dereference it for the next tool in your pipeline. Free, open source, and no account.

Specification to validate

Pasted and uploaded files never leave this tab. A Rust engine compiled to WebAssembly does the work in your browser. A URL is fetched once through our proxy, and nothing is kept.

An example run: an OpenAPI 3.1 spec with 24 operations, its references resolved and one validation error located by line.

Four things one parse gives you

Pick an action above. Every one starts from the same strict read of the document.

Validate by version

The spec is checked against the release it declares, so a 3.0 document is held to 3.0. Each error carries a code, a JSON pointer and a line.

Inspect the surface

Count the operations, schemas, documents and references, and list every operation with its method, path and operationId.

Bundle into one file

Pull the files your spec references into a single document, keeping each $ref, so a tool that reads one file gets the whole API.

Dereference every $ref

Replace references with what they point to, for tools that cannot follow a $ref. A circular reference stays a reference.

OpenAPI versions compared, from Swagger 2.0 to 3.2

What each release changed, OpenAPI 3.1 vs 3.0 included. The parser reads the version line first and holds the document to that release; to move a spec to another version, use Spec Converter.

VersionSchemaWhat the release changedReleases accepted
Swagger 2.0swagger: "2.0"Draft 4One host, basePath and scheme list for the whole API. Request bodies are a parameter with in: body, and shared schemas live under definitions.2.0
OpenAPI 3.0openapi: 3.0.xDraft 5Adds servers, requestBody, components, callbacks and links. Schemas are an extended subset of JSON Schema, and nullable: true marks a value that can be null.3.0.0 to 3.0.4
OpenAPI 3.1openapi: 3.1.x2020-12Schemas become full JSON Schema 2020-12, so type can be a list and nullable is gone. Adds webhooks, and paths becomes optional.3.1.0 to 3.1.2
OpenAPI 3.2openapi: 3.2.x2020-12Adds the QUERY method and other HTTP methods through additionalOperations, nested tags, $self and schemas for streamed responses.3.2.0 and 3.2.1

JSON and YAML are both read, from a URL, an upload or a paste. Numbers keep every digit: a 64-bit id in your spec comes back exactly as written.

Which free tool you need, and when

Three free tools, three different questions about one spec. Most specs want all three, in this order.

Is it valid OpenAPI?

The parser, on this page. It reads the document the way a code generator will and stops at anything the specification does not allow.

This page

Is it the version I need?

Spec Converter moves Swagger 2.0, Postman, RAML and more to the OpenAPI release you pick, and lists every change it made.

Convert a spec

Will it make a good SDK?

Spec Audit scores a valid spec out of 10 on fourteen rules, each one tied to something that breaks in generated code.

Audit a spec

An open-source OpenAPI parser for ten languages

This page runs the published WebAssembly package. The Rust core, a command line tool and bindings for nine more languages live in the same Apache-2.0 repository.

Browser and bundlers

npm install @octri/openapi-parser-wasm

Also a native Node.js package, the Rust crate, and bindings for eight more languages that bundle the native library for Linux x64 and arm64 and macOS arm64.

OpenAPI validator questions

Swagger 2.0 became the OpenAPI Specification when SmartBear gave it to the OpenAPI Initiative, and 3.0 was the first release under the new name. "Swagger" now names SmartBear’s tools, such as Swagger UI and Swagger Editor. A Swagger 2.0 file and an OpenAPI 3.x file describe the same things in a different layout, and the version table above lists what changed.