Loading WASM module...
Paste an OpenAPI or Swagger spec and get typed models in TypeScript, Zod, Swift, Kotlin, or Dart — generated in your browser. Nothing you paste ever leaves your machine.
export interface Pet {
const PetSchema = z.object({
struct Pet: Codable {
data class Pet(
class Pet {
Loading WASM module...
OpenAPI2Code is a zero-dependency code generator for OpenAPI and Swagger specs. Paste or upload a spec above and get typed models for your target language back — entirely in your browser. The playground runs the same Go engine as the CLI, compiled to WebAssembly, so nothing you paste here is ever sent to a server.
Prefer a command line? The same engine ships as a single static binary. Downloads are coming soon.