Paste or import JSON
Use a single object, nested object, or collection of records. The parser validates size, nesting depth, and structure. JSON Lines mode merges up to 1,000 sample records.
DEVELOPER TOOLS / DATA CONTRACTS
Convert JSON and JSON Lines into six typed models. Refine sample-based field rules, validate examples and download an editable, browser-local contract.
Select only the code files you need; the pack includes a manifest, project, source and edited JSON Schema.
Loading model preview…Choose any field to edit its type, required status and nullability. Sample observations do not prove an API contract.
FIELD CONTRACT EDITOR
Select a field in the structure explorerSample observations are evidence, not API guarantees.
Bounds are enforced in local sample/schema validation, not automatically by all six generated serializers.
Select a source and generate to check its fields against the edited contract.
Compiler not run in your browser. Download and test with the appropriate toolchain.
TypeScript is type-only. Python needs Pydantic v2 and Java needs Jackson. Dart and C# compilation is not verified in this browser.
No server or API is contacted. Browser storage is optional; exports are saved to your device.
Java targets Jackson annotations, Python targets Pydantic v2. TypeScript, Dart, C#, and Go target their standard language toolchains.
HOW IT WORKS
Use a single object, nested object, or collection of records. The parser validates size, nesting depth, and structure. JSON Lines mode merges up to 1,000 sample records.
JSONL preserves physical line numbers; use Contract Studio to override inferred types, required/optional status and nullability. Validate supplied samples locally.
Download the selected language, original six-language ZIP, edited Draft 2020-12 schema, or a versioned contract with selected language pack for your own toolchain.
Choose JSON Lines mode and paste one JSON object per line, up to 1,000 records. Missing properties become optional in generated models; this is observed sample coverage, not a guarantee of API requiredness. Arrays in normal JSON mode are also inferred across representative elements.
Download a Draft 2020-12 schema representing the inferred types, nullable options, and required properties. The schema is an approximation from samples, not a replacement for a formally maintained API contract.
No. Parsing and generation happen inside your browser. Turn off “Remember in this browser” to avoid local autosave.
No. Types are inferred from your sample. Arrays with varying object keys produce optional fields. For complete contracts, review against your API schema and test with real data. The browser cannot compile six target languages.
The Python output uses Pydantic v2 and Java models use Jackson annotations. The others target standard language features. Generated code is a starting point and should be reviewed before production use.
Input JSON is capped at 2 MB, nesting at 24 levels, and object fields at 160 per object. Long arrays are sampled across their length for inference, and this is disclosed in the generation notes.
Infer typed models from representative JSON or JSON Lines, review generated types and sample-derived schema, then export source files or a ZIP.
With two JSONL records where one has an optional nickname, inspect the generated field and schema, then export TypeScript and validate it in a separate project.
Inference reflects only samples, not an API contract; unseen variants may be missed. Input caps at 2 MB/1000 JSONL records and large arrays sample at most 2000 items. Java targets Jackson and Python targets Pydantic v2. The tool does not compile output. Review generated files before use.
No. Validate against the full contract and representative payloads.
No. Compile the export in the intended project with its dependencies.