A free browser-based tool that converts any JSON object or array into a complete GraphQL Schema Definition Language (SDL) — with smart type inference, nested types, and list fields. No login. No server.

JSON to GraphQL is a free, browser-based tool that converts any JSON object or array into a complete GraphQL Schema Definition Language (SDL). Paste your JSON on the left, get the ready-to-use schema on the right. Smart type inference handles scalars, nested objects, and list types automatically. No server, no account, no setup.
When you start a new GraphQL API — or add a new resource to an existing one — you need to write the SDL. If you already have JSON data representing the shape of that resource (from an existing REST API, a database record, or a design doc), writing the types by hand is pure repetition:
{
"id": "u_123",
"name": "Alice",
"age": 30,
"isActive": true,
"score": 9.5
}You look at this and write:
type User {
id: ID
name: String
age: Int
isActive: Boolean
score: Float
}That's fine for five fields. For thirty fields across six nested object types, it's tedious and error-prone. A missed field or wrong type costs time in the next review cycle.
The converter inspects every JSON value and maps it to the correct GraphQL scalar:
| JSON value | GraphQL type |
|:---|:---|
| true / false | Boolean |
| Integer number (e.g. 42) | Int |
| Decimal number (e.g. 9.5) | Float |
| String | String |
| Field named id, _id, uuid, guid | ID |
Nested JSON objects become separate named GraphQL types. The parent type references the nested type by name:
{
"id": "u_1",
"address": {
"street": "123 Main St",
"city": "Springfield"
}
}Produces:
type Root {
id: ID
address: Address
}
type Address {
street: String
city: String
}JSON arrays are converted to GraphQL list types. Arrays of objects generate nested types automatically. Arrays of scalars produce the correct list scalar:
{
"tags": ["developer", "designer"],
"posts": [{ "id": "p_1", "title": "Hello World" }]
}Produces:
type Root {
tags: [String]
posts: [Post]
}
type Post {
id: ID
title: String
}All generated fields are nullable — which is idiomatic GraphQL. Add ! (non-null) markers as needed for your schema's requirements. Starting nullable gives you flexibility; making things non-null is always additive.
id, _id, uuid, guid become ID typeThe converter is a pure TypeScript function that recursively walks the parsed JSON tree:
JSON.parse() in the browserGraphQLType records accumulated in an ordered MapNo external GraphQL library is needed. The conversion is a straightforward structural mapping — no AST, no runtime, no dependencies beyond TypeScript.
You have a REST endpoint or a database table and want to design the GraphQL equivalent. Grab a sample JSON response, paste it in, and you have a working schema draft to iterate on.
Your API already has 20 types. You're adding a new Notification resource. The JSON shape exists from the product spec. Convert it, review the fields, add non-null markers and descriptions, done.
SDL syntax is easy to read but unfamiliar to type. Using this converter against JSON you already understand makes the syntax concrete. You see exactly how JSON types map to GraphQL types — a better learning loop than reading docs cold.
Many GraphQL toolchains (GraphQL Code Generator, Pothos, Nexus) accept SDL as input and produce TypeScript types, resolvers, or clients. Start with JSON, generate SDL, feed it to your code gen pipeline.
Teams sometimes document their API shape as JSON. Converting that JSON to GraphQL SDL provides a more structured, schema-typed representation that doubles as API documentation.
npm install, no config fileJSON to GraphQL removes the manual step between having data and having a schema:
Try it now: json-to-graphql.tools.jagodana.com
The client needed a robust developer tools solution that could scale with their growing user base while maintaining a seamless user experience across all devices.
We built a modern application using GraphQL and JSON, focusing on performance, accessibility, and a delightful user experience.
Category
Developer Tools
Technologies
Date
June 2026
More work in Developer Tools