JSON to GraphQL screenshot

JSON to GraphQL

Turn an introspection JSON document back into a GraphQL schema: types, fields, args, interfaces, enums, unions and roots.

Privacy First
0 Runs
Updated 2026-11-17
Runs in your browser
No sign-up, no upload

What the JSON to GraphQL does

Every entry in types is mapped back by kind: OBJECT and INTERFACE to type blocks, INPUT_OBJECT to an input, ENUM to an enum, UNION to a union and SCALAR to a scalar. Built-in scalars are skipped because a schema does not declare them.

Type references are unwrapped the same way they were nested: a NON_NULL wrapper adds !, a LIST wrapper adds brackets.

Descriptions are not restored: the document this page reads carries null. Conventional roots are implicit, so no schema block is printed when the roots are Query, Mutation and Subscription.

How to use it

Paste the introspection JSON into the Introspection JSON box, or press Run with the example already there.

Read the GraphQL schema below: each type is printed with its fields, in the order the document lists them.

Check the GraphQL schema field types against the document — a NON_NULL wrapper in the JSON is the exclamation mark in the schema.

Worked example

Input:

{
  "__schema": {
    "queryType": {
      "name": "Query"
    },
    "mutationType": null,
    "subscriptionType": null,
    "types": [
      {
        "kind": "OBJECT",
        "name": "Query",
        "description": null,
        "fields": [
          {
            "name": "ping",
            "description": null,
            "args": [],
            "type": {
              "kind": "SCALAR",
              "name": "String",
              "ofType": null
            },
            "isDeprecated": false,
            "deprecationReason": null
          }
        ],
        "inputFields": null,
        "interfaces": [],
        "enumValues": null,
        "possibleTypes": null
      }
    ]
  }
}

Output:

type Query {
  ping: String
}

Why it runs in your browser

The result is produced on this page with JavaScript, so it works offline after the page loads and nothing you enter is sent anywhere.

The inverse of the introspection page: read the document a server publishes and print the schema it describes, formatted the same way the beautifier prints one.

It accepts the object bare or wrapped in `data`, which is how a real introspection response arrives.

What it does, and what it does not

Every entry in `types` is mapped back by kind: OBJECT and INTERFACE to type blocks, INPUT_OBJECT to an input, ENUM to an enum, UNION to a union and SCALAR to a scalar. Built-in scalars are skipped because a schema does not declare them.

Type references are unwrapped the same way they were nested: a NON_NULL wrapper adds `!`, a LIST wrapper adds brackets.

Descriptions are not restored: the document this page reads carries null. Conventional roots are implicit, so no `schema` block is printed when the roots are Query, Mutation and Subscription.

How to use JSON to GraphQL

Paste the introspection JSON into the Introspection JSON box, or press Run with the example already there.

Read the GraphQL schema below: each type is printed with its fields, in the order the document lists them.

Check the GraphQL schema field types against the document — a NON_NULL wrapper in the JSON is the exclamation mark in the schema.

What to Expect

Best for

  • Recovering a schema from an introspection document
  • Diffing a published schema against your own copy

Not ideal for

  • Recovering descriptions, which the document may not carry
  • Reading a partial document that lists some types and not others

What this tool keeps

  • Field order as the document lists it
  • Every wrapper in a field's type reference

What may need cleanup

  • Descriptions must be re-authored if they matter
  • Deprecation reasons are not printed

Common errors

  • The page refuses it: the document has no __schema object

Example use cases

  • Turning a saved introspection response into readable SDL
  • Comparing a live schema with a checked-in one

Sample input

Introspection JSON: { …

Sample output

GraphQL schema: type Query { …

Who this is for

  • Developers working with an API they do not own
  • Anyone whose only copy of a schema is an introspection dump

Frequently asked questions

What input shapes are accepted?

The __schema object on its own, or the same object under data.__schema as a server response carries it. Anything else is refused by name.

Why is there sometimes no schema block?

GraphQL treats type Query as the query root without one. The page prints a schema block only when a root differs from that convention.

What happens to built-in scalars?

They are skipped. Int, Float, String, Boolean and ID are part of the language and are not declared by a schema.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.