JSON to OpenAPI Schema

JSON → OpenAPI 3.1 components/schemas entry. UUID, email, URI and ISO-8601 strings get their format keyword, and integers are split into int32 and int64.

JSON to OpenAPI Schema — Free Online Tool

Generates an OpenAPI 3.1 / JSON Schema component from a JSON sample, inferring type and format (int32, int64, double, date-time, email, uri, uuid), describing arrays through their item schema, listing required properties, and emitting either YAML or JSON, useful for documenting an undocumented endpoint or seeding a components/schemas block in a Swagger file.

How to use the JSON to OpenAPI Schema

  • Open the tool above — it runs entirely in your browser, so your input never leaves this page.
  • Paste or type your input into the field, then press the relevant button (e.g. Encode / Decode, Generate, or Convert).
  • Copy the result from the output area with the copy button orCtrl/Cmd + C.
  • No signup, no upload, and no tracking — repeat as often as you need.

Frequently asked questions

Is the output OpenAPI or JSON Schema?

Both. OpenAPI 3.1 aligned its schema object with JSON Schema 2020-12, so the generated component is valid as either — including type: "null", which was not legal in OpenAPI 3.0.

How is the required list decided?

Every property present in the sample with a non-null value is listed as required. Trim the list for optional fields — a sample can show that a field appears, not that it always appears.

What do the format keywords do?

format is an annotation, not a constraint most validators enforce, but it drives documentation rendering and client code generation — date-time becomes a Date in generated TypeScript, int64 becomes a long in generated Java.

Free & private — why use this JSON to OpenAPI Schema

The JSON to OpenAPI Schema runs 100% client-side in your browser. Your data is never uploaded to a server, no account is required, and the tool is completely free. It works offline once the page has loaded and is part of a growing collection of privacy-first developer utilities.

More network & http tools