Orval

Open source

Code generator that turns OpenAPI specifications into type-safe TypeScript clients, query hooks, mocks and validators.

orval.dev
Orval homepage screenshot
GitHub stars
6.6k
Last 30 days
+95(+1%)
Last commit
today
Repository age
6 years
Version
v8.48.0
Licence
MIT
Self-hosted
Yes

About Orval

Orval reads an OpenAPI specification and generates TypeScript code from it, so teams do not have to hand-write API clients. The site shows a Pet Store spec producing typed interfaces and a React Query hook, and describes the output as end-to-end TypeScript types derived from the spec.

Output is not limited to React. Orval generates hooks for React Query, SWR, Angular, Vue, Svelte and Solid, and the stack list also names Axios, Fetch, Zod, Hono and MCP. For testing, it can generate MSW handlers filled with Faker.js data, so frontends can run without a backend.

It is installed as a dev dependency, for example with bun add -d orval, and a docs site and online playground are linked. Version 8 is announced as available. Orval is MIT-licensed and funded through sponsors and backers on Open Collective and GitHub.

Key features

  • Generates clients, mocks and validators from OpenAPI
  • TypeScript types generated from the spec
  • Hooks for React Query, SWR, Angular, Vue, Svelte and Solid
  • MSW mock handlers with Faker.js data

Good fit for

  • Typed API clients from OpenAPI
  • React Query hooks
  • Mock servers for frontend testing
Tags
openapi
typescript
code generation
react query
api client
msw

Orval: questions and answers

What is Orval used for?
Orval is a code generator that turns OpenAPI specifications into type-safe TypeScript clients, query hooks, mocks and validators. It is a good fit for typed API clients from OpenAPI, React Query hooks and mock servers for frontend testing.
Is Orval open source?
Yes. Orval is open source under the MIT licence. Its source code is on GitHub at orval-labs/orval and is written mainly in TypeScript.
Is Orval free?
Yes. Orval is open source, so the software itself is free to use.
Can I self-host Orval?
Yes. Orval can be self-hosted on your own server or infrastructure.
What are some alternatives to Orval?
Similar open-source tools in the API Tools category include Scalar, Loopback Next and OpenWA. SaaS products in the same category include 0mcp, Apidog and Apifox.
Is Orval actively maintained?
Yes. The most recent commit to Orval was on 21 November 2026, and the latest release is v8.48.0, published on 14 November 2026. The project has 6.6k stars on GitHub, with 95 added in the last 30 days.

Open-source alternatives to Orval

See all

SaaS alternatives to Orval

See all