Home › Developer Tools › OpenAPI Validator

OpenAPI Validator

Paste or open an OpenAPI 3.0, 3.1 or Swagger 2.0 document to check it against the specification's structure: required fields, value types, unknown properties, $ref targets, path parameters, operationIds and security references. Every problem links to its line, and you can download a fully dereferenced copy.

Last updated:

Load:
Validation result
Loading…

    Click a problem to jump to its line. Dereferenced downloads inline every internal $ref (recursive references are kept as $ref). Your spec is validated in your browser and never uploaded.

    Advertisement
    Advertisement

    How to use the OpenAPI Validator

    1. Paste your spec into the editor, open a .yaml or .json file, or load a sample.
    2. Read the summary: a green check means no errors; otherwise the count of errors, warnings and notices is shown.
    3. Click a problem to jump to the line in the editor, fix it, and watch the list update as you type.
    4. Filter by errors, warnings or notices to focus on what blocks code generation first.
    5. Export a text report, or download a dereferenced JSON/YAML copy with every internal $ref inlined.

    Most common OpenAPI validation errors and how to fix them

    MessageTypical causeFix
    missing the required property "description" (response)Responses written as 200: {content: …}Add description: to every response; it may be a short phrase.
    does not declare the path parameterPath /users/{id} without a matching parameterAdd name: id, in: path, required: true with a schema, at path or operation level.
    Path parameter must have required: truerequired omitted (it defaults to false)Path parameters are always required: set required: true.
    Broken referenceTypo or wrong section in $refUse the suggested name; 3.x uses #/components/schemas/X, 2.0 uses #/definitions/X.
    must be a string, found numberUnquoted version: 1.0 or openapi: 3.0Quote the value: "1.0", or use a full version like 3.0.3.
    Unknown property / Unknown schema keywordTypos (maxLenght), 3.1 keywords in 3.0, or custom fieldsFix the spelling or prefix custom fields with x-.
    Duplicate operationIdCopy-pasted operationsGive each operation a unique camelCase ID; code generators turn it into a method name.
    Security scheme is not definedName in security differs from securitySchemesUse exactly the key defined under components.securitySchemes.

    OpenAPI 3.0 vs 3.1 vs Swagger 2.0: rules that differ

    TopicSwagger 2.0OpenAPI 3.0OpenAPI 3.1
    Version fieldswagger: "2.0"openapi: 3.0.xopenapi: 3.1.x
    Reusable schemasdefinitionscomponents/schemascomponents/schemas
    Request bodyin: body / formData parametersrequestBodyrequestBody
    Null valuesnot supported (x-nullable)nullable: truetype: [string, "null"]
    pathsrequiredrequiredoptional if components or webhooks exist
    Siblings next to $refignoredignoredallowed in schemas; summary/description elsewhere
    Examples in schemasexampleexampleexamples (array) preferred
    exclusiveMinimumbooleanbooleannumber

    Want to browse the documentation once the spec is valid? Open it in the OpenAPI Viewer, or edit it with a live preview in the OpenAPI Editor.

    Frequently asked questions

    What is the difference between errors, warnings and notices?

    Errors break the specification: tools such as code generators, Swagger UI or API gateways may reject the file or behave unpredictably. Warnings are valid but almost certainly mistakes, like a required property that is not defined. Notices are clean-up hints, such as unused components or tags missing from the top-level list.

    Which OpenAPI versions are supported?

    OpenAPI 3.0.x, OpenAPI 3.1.x and Swagger 2.0 (OpenAPI 2.0). The version field decides which rules apply: for example nullable and boolean exclusiveMinimum are 3.0 features, while type: [string, 'null'], const and boolean schemas are 3.1 only.

    Why is "version: 1.0" reported as an error?

    In YAML an unquoted 1.0 is a number, but info.version must be a string. Write version: "1.0" or 1.0.0. The same applies to openapi: 3.0, which must be the quoted full version such as 3.0.3, and to response codes like 200, which should be quoted keys.

    Does it resolve external $ref files?

    No. References inside the document (#/components/…) are resolved and checked. References to other files or URLs are listed as notices because the browser cannot read your other files; bundle them first or paste a single-file spec.

    What does 'Download dereferenced' do?

    It replaces every internal $ref with a copy of the object it points to, producing a self-contained document that some tools require. References that point back into themselves (recursive schemas) cannot be inlined and are kept as $ref.

    Is this the same as validating against the official JSON Schema?

    It checks the same structural rules as the official OpenAPI JSON Schemas (required fields, types, allowed properties and patterns) and adds semantic checks the schemas cannot express, such as path parameters matching the template, unique operationIds and resolvable $refs. Error messages point to the exact line instead of a schema path.

    Is my API specification uploaded anywhere?

    No. Parsing and validation run entirely in your browser. Only the open-source js-yaml parser is loaded from a CDN to read YAML; your spec never leaves your device.

    Are all the tools on FreeToolCabin tested for quality and accuracy?

    Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

    Related tools

    OpenAPI EditorEdit OpenAPI/Swagger YAML or JSON side by side with live API docs, validation and download.OpenAPI / Swagger ViewerView OpenAPI 2/3 JSON or YAML as interactive API docs with validation and an endpoint list.YAML Validator & FormatterValidate, format and minify YAML, and convert YAML to JSON or back.JSON Schema ValidatorValidate JSON against a JSON Schema (draft-07, 2019-09, 2020-12) with clickable error paths.QR Code GeneratorMake QR codes for links, Wi-Fi, email and more.Barcode GeneratorCreate Code 128, EAN-13, UPC-A, EAN-8, Code 39 and ITF-14 barcodes as PNG or SVG.UUID GeneratorGenerate UUID v4 and v7 / GUIDs in bulk and copy or download them.Schema Markup Generator (JSON-LD)Create JSON-LD structured data for FAQ, Product, Article and more.Htaccess & Nginx Redirect GeneratorBuild 301 redirects for .htaccess, Nginx and Netlify or Cloudflare _redirects.Fake Data GeneratorGenerate mock data as JSON, CSV or SQL.Random String GeneratorGenerate secure random strings and tokens in bulk with any length and character set.API Key GeneratorCreate secure API keys and secrets with prefixes, checksums and SHA-256 hashes for storage.MIME Type LookupFind the MIME type for any file extension, or the extensions for a MIME type, in 400+ entries.Cron Expression GeneratorBuild crontab schedules visually, read them in plain English and see the next run times.URL Slug GeneratorTurn titles into clean, SEO-friendly URL slugs: accents, stop words, separators and bulk lines.JSON Schema GeneratorTurn sample JSON into a draft 2020-12 JSON Schema with types, required fields and formats.Gitignore GeneratorBuild a .gitignore from 50+ templates for languages, frameworks, IDEs and OS, merged and deduped.License GeneratorCreate a LICENSE file for MIT, Apache, GPL, BSD, ISC, MPL or Unlicense with your name and year.ULID GeneratorGenerate sortable ULIDs and UUID v7 in bulk, monotonic option, and decode their timestamps.Htpasswd GeneratorCreate .htpasswd entries with bcrypt, APR1-MD5 or SHA-1 for Apache and Nginx basic auth.Placeholder Image GeneratorCreate placeholder images in any size, color and text as PNG, JPG, WebP, SVG or data URI.Ads.txt GeneratorCreate or validate ads.txt and app-ads.txt files: seller lines, cert IDs and variables.Docker Run to Compose ConverterConvert docker run commands to docker-compose.yml, or a compose file back to docker run.Dockerfile GeneratorGenerate a production Dockerfile and .dockerignore for Node, Python, Go or a static nginx site.HTML Boilerplate GeneratorTick the options you need and get a clean HTML5 starter template with meta, OG tags and CSS reset.JSON to Zod SchemaInfer a Zod (or Yup) schema from sample JSON with optional, nullable and z.infer types.Linux Commands Cheat SheetSearchable Linux and bash command reference with flags explained, examples and copy buttons.LLMs.txt GeneratorBuild an llms.txt file for AI crawlers: summary and link sections, import from your sitemap.Nano ID GeneratorGenerate secure Nano IDs with custom alphabet, length and count, plus a collision calculator.Nginx Config GeneratorBuild an nginx server block: static site, SPA, reverse proxy or PHP, with SSL, gzip and redirects.package.json GeneratorFill a form and get a valid, npm-ready package.json with scripts, dependencies and checks.PKCE Code Challenge GeneratorGenerate an OAuth 2.0 PKCE code_verifier and S256 code_challenge, build auth URLs, verify pairs.README GeneratorFill in a form and get a polished README.md with badges, install, usage and license, live preview.Regex GeneratorBuild regular expressions visually from blocks or presets (email, date, phone) and test them live.Commit Message GeneratorBuild Conventional Commit messages with type, scope, body, breaking change and issue refs.Database Schema DesignerDesign tables and relationships visually, then export SQL for MySQL, PostgreSQL or SQLite.Docker Compose GeneratorBuild a docker-compose.yml with a form: services, ports, volumes, env, healthchecks and presets.Dummy File GeneratorCreate test files of an exact size in KB, MB or GB with zeros, random bytes or text.README Badge GeneratorCreate Shields.io-style README badges for license, version, build and custom labels.Systemd Service File GeneratorCreate a systemd .service unit with ExecStart, user, restart policy, environment and hardening.tsconfig.json GeneratorBuild a tsconfig.json with target, module, strict checks and path aliases, each option explained.Access Log AnalyzerAnalyze Apache and Nginx access logs: top URLs, IPs, status codes, bots and traffic charts.Regex String GeneratorGenerate random test strings that match any regular expression, checked against the real regex.ASCII Table GeneratorTurn CSV or pasted cells into plain-text tables: MySQL, Markdown, Unicode box and reST styles.FFmpeg Command GeneratorPick a task and options, get the exact ffmpeg command with every flag explained.Folder Tree GeneratorTurn a local folder or an indented list into an ASCII directory tree for your README.GitHub Actions Workflow GeneratorBuild a GitHub Actions CI workflow: triggers, matrix, caching, tests, Pages or Docker deploy.Kubernetes YAML GeneratorGenerate Deployment, Service, Ingress, ConfigMap, Secret and HPA manifests with safe defaults.Markdown TOC GeneratorGenerate a linked table of contents from Markdown headings with GitHub-style anchors.Pivot Table MakerBuild pivot tables from CSV or Excel by drag and drop: sum, count, average, charts, export.SQL Query BuilderBuild SELECT queries visually: joins, filters, GROUP BY, ORDER BY and LIMIT, as clean SQL.Truth Table GeneratorType a logic expression and get its full truth table, minterms and canonical DNF/CNF.TypeScript PlaygroundWrite TypeScript with live type checking, see the compiled JavaScript and run it in your browser.Article Schema GeneratorCreate Article, BlogPosting or NewsArticle JSON-LD with headline, authors, dates and images.Event Schema GeneratorCreate Event JSON-LD with dates, venue or online location, tickets, organizer and performers.Google Search Query BuilderBuild advanced Google searches with site:, filetype:, intitle:, exact phrases and date operators.HowTo Schema GeneratorCreate HowTo JSON-LD with steps, tools, supplies, total time and cost, then copy it.Htaccess GeneratorBuild an Apache .htaccess file: HTTPS, www, gzip, caching, error pages, IP blocks, hotlinks.HTML Email Template BuilderDrag and drop blocks to build a responsive, table-based HTML email with inline styles.Organization Schema GeneratorCreate Organization JSON-LD with logo, URL, contact points, address and social profiles.PIN GeneratorGenerate random 4, 6 or 8-digit PINs that avoid sequences, repeats, dates and common PINs.Product Schema GeneratorBuild Product JSON-LD with price, availability, brand, GTIN, ratings and reviews.Question Keyword GeneratorFind the questions people ask about a topic, grouped by who, what, why, how, can and more.Recipe Schema GeneratorCreate Recipe JSON-LD with ingredients, steps, prep and cook times, nutrition and ratings.Security Headers GeneratorPick HSTS, CSP, frame, referrer and permissions options and get Apache, Nginx, Netlify or Cloudflare config.SKU GeneratorBuild consistent SKUs from brand, category, size and color, then export every variant as CSV.Typography Scale GeneratorBuild a modular type scale from a base size and ratio, then copy CSS variables or a Tailwind config.WordPress Salt GeneratorGenerate fresh WordPress security keys and salts for wp-config.php, .env or Docker in one click.
    See all 85 Code Generators & Builders →