JSON to GraphQL Schema
JSON → GraphQL SDL. Fields present in the sample are marked non-null, id and *Id fields become the ID scalar, and arrays become list types.
JSON to GraphQL Schema — Free Online Tool
Generates GraphQL SDL type definitions from a JSON sample, mapping values to Int, Float, Boolean, String and ID, nesting object types, wrapping arrays as list types, marking non-null fields with an exclamation mark, and optionally emitting matching input types, useful for turning an existing REST response into a schema-first GraphQL API.
How to use the JSON to GraphQL 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
Why is every field marked non-null?
A sample payload proves a field can be present, never that it can be absent. The strict reading is emitted so you consciously relax the fields your API may omit — the reverse (adding ! later) is a breaking change for clients, while removing it is not.
When does a field become the ID scalar?
When it is named id or ends in Id. GraphQL's ID is serialized as a string but signals to clients that the value is an opaque key, which matters for cache normalization in Apollo and Relay.
Why can't input types reuse the object types?
The GraphQL spec keeps input and output types separate — an input type may only reference other input types. When you enable input generation, nested references are rewritten to their Input counterpart automatically.
Free & private — why use this JSON to GraphQL Schema
The JSON to GraphQL 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.