OpenAPI → JSON Schema
Paste an OpenAPI 3.0 / 3.1 or Swagger 2.0 spec. Get each named component as a stand-alone JSON Schema (draft 2020-12 by default). Choose how $ref resolve: inline all, rewrite to $defs, or keep as-is.
Paste an OpenAPI spec.
How to extract schemas
- Paste your OpenAPI spec (JSON or YAML).
- The component list appears on the left — every named schema under
components.schemas(OAS 3) ordefinitions(Swagger 2). - Click any name to see the extracted JSON Schema with
$refs resolved or rewritten — your choice via the Refs dropdown:- Inline all — fully expanded.
- Rewrite to $defs — single self-contained schema with $defs.
- Keep as-is —
$refpaths preserved (for assembling into larger specs).
- Download all dumps every component as a
.zipof.jsonfiles.
FAQ
What about OAS 3.0 vs 3.1?
OAS 3.1 is fully JSON-Schema-compatible. 3.0 isn't — nullable: true becomes a union with null; xml and discriminator are dropped.
Does it preserve operations and paths?
No — this tool extracts component schemas only. For operation-level schemas (request / response bodies), pre-flatten into components or use a dedicated OpenAPI tool.
Will it work offline?
Yes — pure JavaScript.