Skip to content
Tesserae

Keyboard shortcuts

Focus search
/
This help dialog
?
Run the current tool
Ctrl/⌘ +Enter
Copy the output (when an output is focused)
Ctrl/⌘ +C

Shortcuts are ignored while you are typing in an input, a textarea or a select.

Data Formats

JSON to GraphQL Types

Paste a JSON sample and get GraphQL SDL (Schema Definition Language) type definitions for it. Scalars are inferred as Int, Float, String or Boolean; nested objects become their own types; arrays become lists; and nulls map to a sensible default. Put a JSON response or configuration sample in one side and type definitions come out the other — everything runs on your device.

On-device No network Offline-ready

🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.

Try:

Options

Your result will appear here

Type or paste your input above, adjust the options, then press Run. Tip: press Ctrl+Enter to run, and ? for every shortcut.

How it works

From a JSON sample to GraphQL SDL

Paste a JSON object and the generator walks it in one pass: strings become String, booleans Boolean, integers Int, floats Float and null a String placeholder. Nested objects become their own types, arrays become list types, and the whole document is emitted as Schema Definition Language with one type block per object.

How arrays and names are derived

An array of strings maps to [String]. An array of objects becomes a list of the singularized type name, so an items field of objects yields type Item and items: [Item]. Colliding names get a numeric suffix, and a mixed-typed array falls back to [String] with a note suggesting a union type. The top-level object takes the Root type name value.

Nullability and indent

By default every field is nullable, an honest reading of a single sample. Mark non-null fields with ! appends ! only to fields whose sample holds a concrete value, leaving nulls plain. The indent option switches the emitted blocks between two and four spaces.

Where a single sample falls short

An empty array cannot reveal its item type, so it becomes [String], and a key that is missing from the sample never appears in the schema. Two different objects that share a field name collapse into one type, so the output is a starting point for a schema, not a complete model. Input must be valid JSON under one million characters.

The sample never leaves this tab

The JSON is parsed and the SDL generated entirely in the browser, so an API response or internal configuration sample is never posted anywhere.

Questions

How are scalars mapped?

Strings map to String, booleans to Boolean, integers to Int and floats to Float. null gets a default scalar (String) so a missing value never breaks the schema.

What about arrays?

Arrays become list types: an array of strings maps to [String]. If the items are objects, each object becomes a type and the field becomes a list of that type.

Is every field nullable?

By default fields are nullable (no !), which is the safe choice for a sample. Turn on "Mark non-null fields with !" to add ! to every field that holds a concrete value.

How is the top-level name chosen?

The top-level object gets the name you provide in "Root type name"; nested objects are named after their field (camelCase → PascalCase). You can rename freely afterwards.

See category