Loading WASM module...
Paste an OpenAPI or Swagger spec and get typed models back in TypeScript, Zod, Swift, Kotlin, Dart, Python, or Pydantic. It happens instantly, right in your browser, with nothing to install, and nothing you paste ever leaves your machine.
export interface Pet {
const PetSchema = z.object({
struct Pet: Codable {
data class Pet(
class Pet {
@dataclass(kw_only=True)
class Pet(BaseModel):
Loading WASM module...
OpenAPI2Code is a zero-dependency code generator for OpenAPI and Swagger specs. Paste or upload a spec above and you'll get typed models for your target language back, right in your browser. The playground runs the same Go engine as the CLI, compiled to WebAssembly, so nothing you paste here ever touches a server. There's no Java runtime to install, no Docker image to pull, no per-language toolchain to set up first. Just paste a spec and generate all seven targets in one run, whether you're kicking the tires or wiring it into a real project.
Prefer a command line? The same engine ships as a single static binary.
Other platforms (Intel macOS, ARM Linux): see all release assets.
No. The playground runs the same Go engine as the CLI, compiled to WebAssembly, so it works entirely in your browser. Whatever spec you paste or upload stays on your machine.
OpenAPI 3.0, OpenAPI 3.1, and Swagger 2.0.
TypeScript interfaces, Zod runtime validation schemas, Swift Codable structs, Kotlin data classes, Dart classes, Python dataclasses, and Pydantic BaseModel classes. All from the same spec, and you can generate more than one at a time.
Yes. It's MIT licensed and free to use, and the source is on GitHub.
Yes. Besides the browser playground, it ships as a single zero-dependency static binary for macOS, Linux, and Windows, and you can grab it from GitHub Releases.
The test suite runs real generated output through the actual
compiler or interpreter for each target (tsc,
swiftc,
kotlinc,
dart,
python3 — including a
real Pydantic import check) instead of just comparing it as
text. Enums also keep their real type now, so a boolean or
integer enum won't get flattened into a string.