JSON Schema Generator
Infer a starter JSON Schema (draft 2020-12) from sample JSON, with types, nested objects, arrays, required keys and formats.
Open toolGenerate TypeScript interfaces or type aliases from sample JSON, with optional keys and nullable fields inferred.
Paste a JSON API response or config and get TypeScript types for it. Nested objects become their own named interfaces (array items get singular names, so users becomes User), keys that are missing from some array items become optional, null values add | null, and arrays holding mixed values become union arrays. Keys that aren’t valid identifiers are quoted.
Choose interface or type declarations, export, readonly properties, and whether missing keys are written key?: T or key: T | undefined. Types are inferred from the sample you paste, so check them against your API’s documentation — a sample can’t show every possible value. Everything runs in your browser. Your data is never uploaded, logged or stored.
Your code or text
Pasted or opened from a file
Processed in this browser
Instant, in-browser. Nothing is uploaded.
Your result
Ready to download or copy
Paste sample JSON.
Set the root type name and declaration options.
Copy the types or download types.ts.
Zero-upload architecture
Free, with no sign-up or watermark · Your files stay on your device
Launch the app and add your file. There is nothing to install and no account to create.
Set the root type name and declaration options.
Copy the types or download types.ts.
Infer a starter JSON Schema (draft 2020-12) from sample JSON, with types, nested objects, arrays, required keys and formats.
Open toolPretty-print, beautify and validate JSON with precise error locations, key sorting and custom indentation.
Open toolBrowse a GraphQL schema from SDL or introspection JSON: types, fields, arguments, enums, unions and deprecations.
Open toolEdit, validate, format and explore JSON with a code editor, tree view and table view, then convert it to CSV, YAML or TypeScript.
Open tool