JSON to TypeScript
Paste a JSON sample and get TypeScript types inferred from it, updated live as you edit. Switch the target to Zod or Pydantic v2, pick a root type name and copy or download the generated code.
FAQ
- How are optional fields detected?
- Objects inside arrays are merged: a key missing from some items becomes optional, and a key seen with different value types gets a union type.
- Is my code uploaded anywhere?
- No. Formatting runs entirely in your browser; the code you paste is not sent to a server. The only feature that talks to a backend is the optional encrypted share link, which encrypts the snippet in your browser first.