Skip to tool

JSON to GraphQL Types

Generate GraphQL types from JSON.

How to Use This Tool

  1. Paste JSON.
  2. Set a root type name.
  3. Click Generate Types.

Learn More About JSON to GraphQL Types

Why GraphQL types?

GraphQL schemas provide a contract between clients and servers, keeping APIs consistent and discoverable.

About JSON to GraphQL Types

GraphQL types describe your API schema. This tool generates type definitions from JSON samples so you can scaffold GraphQL schemas quickly.
Create GraphQL type definitions from JSON.
Runs in browser
Yes
Output
GraphQL SDL
Nested types
Yes

Examples

Generate GraphQL types

Convert JSON into GraphQL SDL.
Input
{"id":1,"name":"Ava"}
Output
type Root {
  id: Int
  name: String
}

Features

GraphQL output

Generates type definitions for GraphQL schemas.

Scalar inference

Infers String, Int, Float, and Boolean types.

Nested types

Builds nested GraphQL types for objects.

Use Cases

  • Draft GraphQL schemas from APIs.
  • Generate types for prototyping.
  • Align data contracts with JSON payloads.

Frequently Asked Questions

Generate Prisma models or Zod schemas with related tools.