Overview
Elysia is a web framework for building back ends with Bun, designed around TypeScript inference. Path parameters, query strings and bodies are typed automatically from the route definition, and the built-in schema builder (Elysia.t) validates values at runtime while also providing compile-time types. It also accepts Standard Schema libraries such as Zod, Valibot, ArkType and Effect Schema.
Because Elysia analyses handlers and generates optimised code, its own benchmark table puts it just behind raw Bun and ahead of Hono on Bun, Fastify and Express. Plugins add OpenAPI documentation and other features, and an end-to-end typed client lets front ends call the API with shared types.
Bun is the primary target. A Node adapter (@elysia/node) lets the same app run on Node.js, with tsx recommended for development, though the docs present Bun as where it is optimised.
Elysia has been developed since late 2022 under the MIT licence. Most commits come from its author, SaltyAom, with a smaller group of contributors, and the project is funded by sponsors.
Pricing and plans
What it does
- Type inference
- Route params, query, body and responses are typed from the definition without manual declarations.
- Schema validation
- Elysia.t schema builder plus Standard Schema support for Zod, Valibot, ArkType and others.
- OpenAPI
- OpenAPI documentation generated from route definitions.
- Typed client
- End-to-end typed client for calling the API from TypeScript front ends.
- Runtime adapters
- Runs on Bun natively and on Node.js via @elysia/node.
Strengths and limitations
Strengths
- Very high throughput on Bun in its published benchmarks
- Strong end-to-end type safety with little manual typing
- Validation, types and docs from one schema
- Familiar chained routing API
Limitations
- Optimised for Bun; other runtimes need an adapter and extra peer dependencies (the docs note pnpm needs them installed manually)
- Development is concentrated in one lead maintainer, according to the repository's contributor history
- Smaller plugin ecosystem and fewer production references than Express or Fastify
- No ORM, auth system or job queue built in
Who it suits
Good for
- APIs running on Bun
- TypeScript full-stack projects that want a typed client
- Side projects and small teams comfortable with a newer framework
Look elsewhere if
- Organisations that need a framework with foundation governance or vendor support
- Teams standardised on Node without Bun
Alternatives to Elysia
Questions
Does Elysia work on Node.js?
Yes, through the @elysia/node adapter, though it is optimised for Bun.
Is Elysia faster than Hono?
In Elysia's own benchmark table on Bun it averages higher throughput than Hono on Bun.
Can I use Zod with Elysia?
Yes. Elysia supports Standard Schema libraries including Zod, Valibot and ArkType.
Is Elysia free?
Yes, it is MIT licensed.
Sources read for this page