Free JSON to GraphQL — types · queries · mutations

Convert JSON to GraphQL
Schema, queries
and mutations.

Generate a complete GraphQL schema from any JSON sample. Types, Input types, Query and Mutation — all inferred from your data. Runs entirely in your browser.

Your data never leaves your browser
Types · Input · Query · Mutation
Nested objects → separate types
Non-null (!) inferred automatically
Always free
JSON to GraphQL Schema Generator   100% client-side
Use a representative JSON sample with real values — null fields become nullable (no !), non-null values get the non-null modifier.
JSON input
  GraphQL schema ready

      
JSON to GraphQL type mapping

How JSON values map to GraphQL scalar and composite types.

JSON valueGraphQL typeWith null
"Alice"String!String
42Int!Int
98.5Float!Float
trueBoolean!Boolean
nullString
["a", "b"][String]![String]
[{…}, {…}][ChildType]![ChildType]
{…}ChildType!ChildType
When do you need JSON to GraphQL?
API development kickstart

When starting a new GraphQL API, generate the schema from a sample API response or database record. The generated types, queries and mutations give you a working schema to build resolvers against — no manual type definition boilerplate.

REST to GraphQL migration

When wrapping a REST API with a GraphQL layer, paste the REST response JSON to generate the corresponding GraphQL types. The Query type shows how to expose list and single-item endpoints, and the Mutation type covers write operations.

Database schema to GraphQL

Export a row from your database as JSON and generate the GraphQL type. Nested relations (foreign keys loaded as objects) become separate GraphQL types automatically — mirroring the structure you'd define manually in a GraphQL-first schema.

Testing and mocking

Generate GraphQL types from mock data JSON to set up Apollo Server mocking, MSW (Mock Service Worker) or graphql-tools schema stitching without writing type definitions from scratch.

Popular searches
json to graphql schema json to graphql convert json to graphql json schema to graphql json to graphql query convert json to graphql query json to graphql converter json to graphql online json to graphql mutation json schema to graphql schema

GraphQL schema generated
in your browser. No server.

The generator traverses the JSON tree recursively, building GraphQL type definitions for every nested object. Type names are derived from the JSON key using PascalCase conversion. Non-null modifiers (!) are added automatically for any field with a non-null value in the sample.

The Input type mirrors the main type but removes all ! modifiers — making all fields optional for partial update mutations, following the standard GraphQL pattern.

Full CRUD schema
Types, Input types, Query (list + by ID) and Mutation (create, update, delete) — a complete working schema from one JSON sample.
Non-null inference
Fields with non-null values get ! — correctly representing required fields. Null values stay nullable.
Nested types
Each nested JSON object becomes a separate named GraphQL type — no Map or JSON scalar shortcuts.
47 tools, always free
No file size limits, no watermarks, no account. Funded by non-intrusive display advertising only.
Frequently asked questions
How do I convert JSON to a GraphQL schema?
Paste your JSON sample, set the root type name (e.g. User, Product), choose what to include (types only, with query, or full CRUD with mutations), and click Generate. The output is valid GraphQL SDL that you can paste directly into Apollo Server, Yoga, Pothos or any other GraphQL server.
What is the Input type and why does it remove the ! modifiers?
Input types are used in mutation arguments. The ! is removed from all fields to make them optional — this follows the standard GraphQL pattern for update mutations where you only send the fields you want to change (partial update / PATCH semantics). The create mutation can add its own required field validation in the resolver.
Why is the id field typed as ID! instead of Int!?
The GraphQL ID scalar represents a unique identifier — it serializes as a string but can be backed by an integer or UUID. Using ID! is the GraphQL convention for identifier fields, making the schema more portable and compatible with tools like Apollo Client's normalized cache. Disable this with the ID field option above.
Is the JSON to GraphQL converter free?
Yes, completely free. No file size limits, no account required.
Go up