OpenAPI Validator & Viewer
Paste or upload an OpenAPI 3.0/3.1 or Swagger 2.0 spec in YAML or JSON. Get a list of structural errors with JSON pointers and line numbers, then browse the endpoints by tag with resolved schemas and a ready-to-run cURL command for every operation.
Private by design: anything you enter is processed in your browser only. It is never uploaded to or logged on our servers. The spec is parsed and validated locally; nothing is fetched from your servers, and share links carry the spec text in the link itself, so very large specs cannot be shared.
Validation runs as you type. Only local #/... references are resolved; nothing is downloaded.
Validation
Click a line number to jump to it in the editor. Line numbers are best-effort for YAML flow style ({ }, [ ]).
API Viewer
About this OpenAPI validator
OpenAPI (formerly Swagger) is the standard way to describe a REST API: its paths, operations, parameters, request bodies, responses and data models. A single mistake in the spec, such as a path parameter that is not declared or a $ref that points to a renamed schema, can break code generators, mock servers, contract tests and the documentation your consumers read. This tool catches those problems before they reach your pipeline.
The validator applies a focused set of structural rules taken from the Swagger 2.0, OpenAPI 3.0 and OpenAPI 3.1 specifications: required top-level fields and their types, path keys, HTTP method names, unique operationId values, matching path templates and in: path parameters, response objects, local $ref resolution, security requirements and server variables. It also reports softer findings such as unused components and operations without a summary. It is not a complete JSON Schema meta-validation of every keyword, so run your usual linter (for example Spectral or swagger-cli) in CI as well.
The viewer groups operations by their first-listed tag (operations with several tags appear under each one), shows parameters, request bodies and responses, and expands $ref schemas into a readable tree. Recursive models, such as an Author that lists Books that point back to their Author, are cut off at the first repeat and marked as circular. Each operation gets a sample cURL command built from the first server URL, example values and the declared security scheme, so you can try the endpoint in a terminal right away.
Related tools: fix raw syntax with the JSON validator or JSON beautifier, switch a spec between YAML and JSON with the data format converter, query response payloads with the JSONPath tester, and create request bodies for your schemas with the mock data generator. Bearer tokens from the generated cURL commands can be inspected with the JWT decoder.
Reference Guide
Swagger 2.0 vs OpenAPI 3.x at a glance:
| Topic | Swagger 2.0 | OpenAPI 3.0 / 3.1 |
|---|---|---|
| Version field | swagger: "2.0" | openapi: 3.0.3 or openapi: 3.1.0 (a string) |
| Server location | host, basePath, schemes | servers array of URLs with optional {variables} |
| Reusable models | definitions, parameters, responses, securityDefinitions at the root | components: schemas, parameters, responses, requestBodies, headers, securitySchemes, examples, links, callbacks (3.1 adds pathItems) |
| Reference prefix | #/definitions/Pet | #/components/schemas/Pet |
| Request body | A parameter with in: body (or in: formData) plus consumes | requestBody with a content map per media type |
| Response body | schema on the response plus produces | content map per media type |
| Parameter locations | query, header, path, formData, body | query, header, path, cookie |
| Parameter type | type directly on the parameter | schema (or content) on the parameter |
| HTTP methods | get, put, post, delete, options, head, patch | Adds trace |
| Response code ranges | Not supported | 1XX to 5XX |
| Nullable values | Not supported (vendor x-nullable) | 3.0: nullable: true; 3.1: type: [string, "null"] |
paths required? | Yes | 3.0: yes; 3.1: one of paths, components or webhooks |
Common validation errors and how to fix them:
| Error | Cause | Fix |
|---|---|---|
| Path parameter not declared | /users/{id} has no parameter with name: id and in: path | Add it at path-item or operation level |
| Path parameter not required | in: path without required: true | Path parameters must always be required |
Broken $ref | Typo, renamed schema, or 2.0/3.x prefix mix-up | Point at an existing #/components/... (3.x) or #/definitions/... (2.0) entry |
Duplicate operationId | Copy-pasted operations | Make every operationId unique; generators use it as a method name |
info.version must be a string | YAML reads version: 1.0 as a number | Quote it: version: "1.0" |
| Invalid method key | GET: in upper case or a typo such as gett | Use lower-case method names |
Missing responses | Operation has no response codes | Add at least one, for example '200' with a description |
| Equivalent paths | /pets/{id} and /pets/{petId} both exist | Merge them; templated paths that differ only in parameter names are identical |
File structure cheat sheet (OpenAPI 3.x):
| Field | Required | Contains |
|---|---|---|
openapi | Yes | Spec version string |
info | Yes | title and version (required), description, contact, license |
servers | No | Base URLs. When omitted, tools assume / |
paths | 3.0: yes | /path → method → operation (parameters, requestBody, responses) |
components | No | Reusable schemas, parameters, responses, security schemes |
security | No | Default security requirements, referencing names in components.securitySchemes |
tags | No | Tag names and descriptions used to group operations |
webhooks | No (3.1 only) | Incoming requests your API sends to consumers |
Example input
openapi: 3.0.3
info:
title: Bookstore API
version: 1.2.0
paths:
/orders/{orderId}:
get:
operationId: getOrder
parameters:
- name: orderId
in: path # error: missing required: true
schema:
type: string
responses:
'200':
description: The order
This sample loads automatically when you open the tool. Use Load Sample to bring it back.
Frequently Asked Questions
Swagger 2.0 and OpenAPI 3.0 and 3.1 documents, in YAML or JSON.
Required fields, path and method structure, path parameters that are declared and required, unique operationIds, responses, and broken local $ref references. It also lists unused components.
No. The spec is parsed and validated in your browser.
Related Tools
All QA & Testing Tools →HAR File Viewer & Analyzer
Open HAR files from browser DevTools to inspect every reques...
SOAP Message Viewer & Request Builder
Format and inspect SOAP 1.1 and 1.2 envelopes, read headers,...
XPath & CSS Selector Tester
Test XPath expressions and CSS selectors against your HTML o...
What Is My IP Address
Instantly find your public IP address with geolocation detai...
Network Speed Tester
Fast.com-inspired Network Speed Tester. Measure download spe...
Subnet Calculator
Calculate IPv4 subnets from CIDR notation: network and broad...