Why generate schemas from samples?
When you have a response body but no formal contract, inferred types speed up clients, validators, and docs.
Paste JSON and switch between TypeScript, Zod, JSON Schema, and OpenAPI — generated locally with no network calls.
How to use this tool
- Paste a representative JSON sample and set a root type name.
- Switch tabs for TypeScript, Zod, JSON Schema, or OpenAPI output.
- Copy the generated schema into your project.
Frequently asked questions
How accurate are inferred types?
Inference follows the sample. Optional fields appear when array objects omit keys; widen samples for better unions.
Does this use an online API?
No. Everything runs in the browser.