DevToolsmith

OpenAPI and Swagger Validator

Validate Swagger 2.0 or OpenAPI 3.0/3.1, browse complete API documentation and export JSON or YAML. Everything runs locally; the viewer never calls your API.

Runs 100% in your browser — nothing is uploaded

OpenAPI / Swagger document (JSON or YAML)
Tip: drop a file here642 chars · 642 bytes · 34 lines

API style checks · Spectral

Choose the checks your team uses. Style findings are separate from structural validation.

Validate a document before sharing it

Paste JSON or YAML and run validation. Structural checks use the published Swagger 2.0 and OpenAPI schemas. The endpoint list shows methods, paths, operation IDs, parameters and response codes. Switch between full documentation and the endpoint list, then download the report or export the specification as JSON/YAML. Format conversion does not upgrade the specification version.

Declare a required path parameter
paths:
  /users/{id}:
    get:
      operationId: getUser
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: A user

References stay inside the document

A reference such as #/components/schemas/User is resolved as a JSON Pointer. Missing targets are errors. References to other files or HTTPS URLs are left unresolved and explicitly reported, rather than silently fetched. A document with unresolved external references has an incomplete reference check even when its structure passes.

Swagger 2.0 and OpenAPI 3.x

Swagger 2.0 uses host, basePath and schemes for server locations, definitions for reusable schemas, and body/formData parameters. OpenAPI 3.x uses servers, components and requestBody. These documents are checked in their original dialect; export changes serialization, not the API version.

OpenAPI 3.0 and 3.1 are different

OpenAPI 3.0 uses its own Schema Object subset, including nullable. OpenAPI 3.1 aligns with JSON Schema 2020-12 and supports a schema dialect. This tool checks the surrounding 3.1 document structure but does not fully validate embedded Schema Objects or custom dialects. Use the JSON Schema Validator to test a schema against data.

To inspect actual traffic, use the HAR analyzer. To turn a captured request into code, use the cURL converter.

An OpenAPI description documents HTTP APIs. For a GraphQL query or schema document, use GraphQL Formatter to inspect supported syntax instead; that tool does not validate a request against your running service’s schema.

Frequently asked questions

Which OpenAPI versions are supported?

Swagger 2.0 and OpenAPI 3.0.x / 3.1.x, as JSON or YAML. Structural checks use the published specification schemas. OpenAPI 3.2 is not supported.

Are external references fetched?

No. Local JSON Pointer references are checked within the document. External references produce an incomplete-check warning. Bundle referenced files first for a complete local reference check.

What does the validator check?

Document structure, required fields, supported schema formats, missing local references, duplicate operation IDs and required path parameter declarations. It does not call endpoints or verify responses against live servers. Embedded OpenAPI 3.1 JSON Schema constraints and custom dialects are not fully validated.

Is the preview interactive API documentation?

The full documentation tab uses locally bundled Swagger UI to show operations, parameters, request bodies, responses, schemas and authentication descriptions. Try it out, network requests and persistent authorization are disabled. A compact endpoint list is also available.