Paste sample JSON and generate strongly-typed classes with separate nested types. Supports TypeScript, Java, Python, C#, Kotlin, Swift, Go, Rust, and PHP.
More free utilities you might find useful
Quick answers to common questions
Every nested object becomes its own separate, properly named class — not a flattened structure. For example, a "customer" object nested inside an "order" object generates both an Order class and a separate Customer class, with Order referencing Customer, matching how you'd structure the code by hand.
TypeScript, Java (class or record), Python (dataclass or Pydantic), C#, Kotlin, Swift, Go, Rust, and PHP. Each follows that language's standard naming conventions — for example, camelCase fields in Java and TypeScript, snake_case in Python and Rust, PascalCase properties in C#.
Types are inferred from your sample JSON values. If a field could contain different types across different records (e.g. sometimes a number, sometimes null), provide a representative sample that shows the range of values you expect, since inference is based only on what's in the JSON you paste.
No. All type inference and code generation happens entirely in your browser using JavaScript. Your JSON is never sent to any server.
Your data is processed entirely in your browser. Nothing is sent to any server.