Skip to content
LovTools
EN

JSON to GraphQL Schema

Generate GraphQL type definitions from a JSON sample.

Processed locally on your device — nothing is uploaded.

About the JSON to GraphQL Schema

Starting a GraphQL API from existing JSON data? Paste a sample response and get schema definition language (SDL) types: each nested object becomes its own type, arrays become lists, and values become Int, Float, Boolean or String.

Choose whether to mark fields as non-null with !. Keys that are not valid GraphQL names are converted to safe ones, and null values are typed with a JSON scalar that you can replace. Fields called id are typed from their sample value — switch them to ID if they are identifiers.

How to use the JSON to GraphQL Schema

  1. Paste sample JSON.
  2. Name the root type and choose non-null.
  3. Copy the type definitions.

Features

  • Nested types and lists
  • Optional non-null markers
  • Safe field names
  • Download as .graphql

Supported formats

  • Plain text

Frequently asked questions

Does it generate queries and resolvers?

No — it writes type definitions only. Add Query and Mutation types for your API.

Is my text sent anywhere?

No. Everything runs in your browser, so nothing you paste is uploaded or stored.

Added · Last reviewed · Maintained by Sohail Khax · How we test tools