Manipulation Tools

JSON Schema to OpenAPI

Convert a JSON Schema into an OpenAPI 3.0-compatible schema object, wrapped in a ready-to-use components.schemas document.

What does this tool do?

Convert a JSON Schema into an OpenAPI 3.0-compatible schema object, wrapped in a ready-to-use components.schemas document. Everything runs locally using JavaScript in your browser — nothing you paste or upload is ever sent to a server.

How to use this tool

  1. Paste your json schema into the left-hand box.
  2. Fill in the schema name field above the input.
  3. Click Convert to OpenAPI.
  4. Copy the openapi document from the output box.

Frequently asked questions

What actually changes between JSON Schema and OpenAPI 3.0?

OpenAPI 3.0 doesn't allow type to be an array of types. This tool converts a nullable union like ["string", "null"] into type: "string" with nullable: true, which is how OpenAPI 3.0 expresses the same thing.

What does the output document look like?

The converted schema is wrapped inside an openapi: "3.0.3" document under components.schemas.<YourSchemaName>, so you can paste it directly into an existing OpenAPI spec's components section.

Is this compatible with OpenAPI 3.1?

OpenAPI 3.1 aligns closely with JSON Schema and does allow type arrays, so if you're targeting 3.1 you may not need the nullable conversion this tool performs — you can use your original schema's type array as-is.