OpenAPI to JSON Schema Converter — Free Online
Extract OpenAPI 3.0–3.2 components.schemas into JSON Schema — default Draft 2020-12 ($defs), optional Draft-07 (definitions). Browser-local, no upload.
Developer notes
• OpenAPI 3.0 schemas convert via @openapi-contrib/openapi-schema-to-json-schema. • OpenAPI 3.1 / 3.2 use a best-effort strip of OAS-only keywords. • Default output: $schema 2020-12 + $defs; optional Draft-07 remap ($schema + definitions + #/definitions refs). • Empty components.schemas → error. • External $ref rejected. • Max input 512 KiB.
Options
Use cases
• Reuse OpenAPI models as standalone JSON Schema. • Feed extracted schemas into JSON Schema Validator. • Diff schema shapes outside of a full OpenAPI document.
Examples
OpenAPI YAML → JSON Schema $defs
Before
After
Empty schemas rejected
Before
After
OpenAPI to JSON Schema FAQ
Common questions
Is 3.1 conversion identical to Draft-07?
No. OpenAPI 3.1/3.2 conversion is a best-effort keyword strip. Default output is Draft <strong>2020-12</strong> (<code>$defs</code>). Choose <strong>Draft-07</strong> for a structural remap (<code>definitions</code> + Draft-07 <code>$schema</code>) — not a full keyword rewrite. See Options.
What if there is no Root schema?
All schemas land under <code>$defs</code> (or <code>definitions</code> when Draft-07 is selected) with no invented root type/properties. A schema named Root also gets a top-level <code>$ref</code> to that entry.
Related tools?
Convert the other way with JSON Schema to OpenAPI, or validate the OpenAPI source with Validate OpenAPI.
More API & schema tools in this cluster
Looking for converters, encoders, formatters, and minifiers in one place? Developer tools hub Open the curated developer tools catalogue.