OpenAPI Spec Validator

Validate OpenAPI 2.0 (Swagger) and OpenAPI 3.0/3.1 specification files for compliance, missing required fields, unresolved $ref paths, and schema errors. Paste JSON or YAML or upload a file — errors and warnings are listed by path with severity levels and actionable fix suggestions. All validation runs entirely in your browser.

API ToolsAPI & Backend
Loading tool...

How to Use OpenAPI Spec Validator

How to Use the OpenAPI Spec Validator

Step 1: Paste or Upload Your Spec

Paste your OpenAPI or Swagger specification directly into the textarea, or click Upload to load a .json, .yaml, or .yml file from your computer. Both JSON and YAML formats are fully supported.

Step 2: Load an Example (optional)

Click one of the example buttons to load a pre-built spec:

  • Minimal 3.0 — the smallest valid OpenAPI 3.0 spec
  • Petstore 3.0 — a complete API with schemas, parameters, and request bodies
  • Swagger 2.0 — a Swagger 2.0 spec with definitions and path parameters
  • With Errors — an intentionally broken spec showing common mistakes

Step 3: Click Validate Spec

Click Validate Spec to run validation. Results appear immediately in the right panel.

Step 4: Review the Status and Stats

The status card shows whether the spec is valid (green) or invalid (red). The stats grid shows the detected version (Swagger 2.0, OpenAPI 3.0, or 3.1), the number of paths, operations, and schemas defined, plus the total error and warning counts.

Step 5: Fix Issues

The Issues panel lists each error and warning with:

  • Path — the JSON path inside the document where the issue was found (e.g., #/paths/users/get/responses)
  • Message — a plain-English description of the problem
  • Fix suggestion — a specific action you can take to resolve it

Errors (red) indicate spec non-compliance. Warnings (amber) are best-practice recommendations that do not prevent the spec from being technically valid.

What the Validator Checks

  • Version fieldopenapi (3.x) or swagger (2.x) must be present at the root
  • info objecttitle and version are required; description is recommended
  • paths object — must be present; each path must start with /
  • Operations — each must have a responses object with at least one entry
  • Parameters — must include name and in with valid values; path parameters must match the URL template
  • $ref resolution — all internal $ref values must point to paths that exist in the document
  • Security — if root security is set, the corresponding scheme definitions must exist
  • Best practicesoperationId, summary/description, requestBody for POST/PUT/PATCH, and 2xx responses

Limitations

This is a structural validator based on the OpenAPI specification rules. It does not execute a full JSON Schema validation of property values, does not check external $ref URLs, and does not validate discriminator or oneOf/anyOf semantics. For full compliance testing, use the validator as a first pass and follow up with an official OpenAPI library in your build pipeline.

Frequently Asked Questions

Most Viewed Tools

📺

Screen Size Converter

1,674 views

Calculate screen width and height from diagonal size and aspect ratio. Convert between inches and centimeters for displays, TVs, and monitors with instant dimension calculations.

Use Tool →
🔀

Reorder PDF Pages

609 views

Drag and drop to rearrange PDF pages in any order. Upload your PDF, preview all pages as thumbnails, drag pages to reorder them, and download the rearranged PDF. Fast, visual, and privacy-focused.

Use Tool →
🖨️

DPI Calculator

596 views

Calculate DPI (dots per inch), image dimensions, and print sizes. Convert between pixels and physical dimensions for printing and displays.

Use Tool →
📄

Paper Size Converter

550 views

Convert between international paper sizes (A4, Letter, Legal) with dimensions in mm, cm, and inches. Compare ISO A/B series and North American paper standards.

Use Tool →

Fuel Consumption Converter

428 views

Convert between MPG (miles per gallon), L/100km (liters per 100 kilometers), and other fuel efficiency units. Compare car fuel economy across different measurement systems.

Use Tool →
✂️

CSV Splitter

370 views

Split large CSV files into smaller files by number of rows. Process large datasets in manageable chunks instantly.

Use Tool →
🛍️

Product Schema Generator

339 views

Generate JSON-LD Product schema markup for SEO. Add product details like name, price, brand, rating, and availability to create structured data for rich search results.

Use Tool →
📏

Child Height Predictor

327 views

Predict child adult height based on parent heights using the Mid-Parental Height method. Calculate how tall your child will be with genetic predictions.

Use Tool →

Related API & Backend Tools

✍️

JWT Encoder & Signer

Construct and sign JWT tokens locally in your browser. Edit header and payload JSON, choose HS256/HS384/HS512, enter a secret, and generate a signed token instantly. Nothing is uploaded.

Use Tool →
🔌

API Tester

Test HTTP API endpoints directly in your browser. Make GET, POST, PUT, PATCH, and DELETE requests with custom headers and request bodies. View status codes, response headers, and pretty-printed JSON responses — all client-side, no server proxy.

Use Tool →
🔐

OAuth Token Validator

Validate and inspect OAuth tokens in your browser. Decode JWT access tokens and ID tokens to view claims, scopes, and expiry. Analyse opaque tokens for entropy and format. Free and private.

Use Tool →

GraphQL Query Formatter

Format and prettify GraphQL queries, mutations, subscriptions, and fragments with correct indentation.

Use Tool →
🔑

JWT Token Validator

Decode and validate JWT tokens instantly in your browser. Inspect header and payload claims, check expiry, and verify HMAC signatures (HS256/HS384/HS512). Free and private.

Use Tool →

Webhook Payload Generator

Generate realistic sample webhook payloads for Stripe, GitHub, Slack, and custom event schemas. Select a provider and event type to instantly produce a correctly structured JSON payload you can copy or download to seed webhook handlers, write tests, and build integrations.

Use Tool →
🔀

CORS Header Generator

Build CORS configuration headers interactively for web servers and APIs. Set allowed origins, methods, request headers, credentials, and preflight cache duration — then copy the generated Access-Control headers or ready-to-paste code snippets for nginx, Express.js, Flask, and .NET.

Use Tool →
🪝

Webhook Validator

Validate and inspect webhook payloads in your browser. Auto-detects GitHub, Stripe, Slack, and Shopify webhooks, extracts event details, and optionally verifies HMAC signatures. Free and private.

Use Tool →

Share Your Feedback

Help us improve this tool by sharing your experience

We will only use this to follow up on your feedback