Updated Nov 11, 202616 min read

Express Alternatives in 2026

Encore, Fastify, NestJS, Hono and Elysia ranked for TypeScript teams moving off Express, with code and current versions

Illustration for Express Alternatives in 2026

The best Express alternative in 2026 is Encore, an open source backend framework with built-in infrastructure: you define type-safe APIs, Postgres databases, Pub/Sub topics and cron jobs in TypeScript, encore run starts them locally, and a deploy provisions them in your own AWS or GCP account. Fastify is the closest drop-in upgrade, NestJS suits large teams that want strict structure, Hono suits edge runtimes and Elysia suits Bun.

Express has been the default Node.js framework for over 15 years, and Express 5.3.0 is still where a lot of Node.js backends start. It gives you routing and middleware and stops there, so request validation, TypeScript types, tracing and every database or queue connection come from libraries you pick and wire yourself, and the cloud resources behind them come from Terraform or someone else's ticket queue.

The five alternatives below differ mainly in how much of that they take on. For a broader comparison, see our Best TypeScript Backend Frameworks guide.

What are the best Express alternatives at a glance?

RankAlternativeLatest versionWhy it is on this list
1Encorev1.58.8Backend framework with built-in infrastructure: type-safe APIs, tracing, and the databases, cron jobs and buckets your code declares provisioned in your own cloud; runs existing Express routes during migration
2Fastifyv5.12.8Closest upgrade from Express, with JSON Schema validation and plugins
3NestJSv12.4.2Modules and dependency injection for large teams
4Honov4.13.18Small, Web Standards based, runs on edge runtimes
5Elysia1.4.31 (2.0 in release candidate)Bun-first, with types inferred from one schema
FeatureEncoreFastifyNestJSHonoElysia
Primary Use CaseBackends with built-in infrastructureSchema-validated APIsLarge team backendsEdge & serverlessBun-first APIs
Type SafetyNative TS typesJSON Schema + TypeBoxDecoratorsBuilt-inInferred from TypeBox schemas
Built-in ValidationYesYes(JSON Schema)Yes(decorators)Via middlewareYes(TypeBox)
Infrastructure from CodeYesNoNoNoNo
Built-in TracingYesNoNoNoNo
Auto API DocumentationYesYes(via plugins)Yes(via plugins)NoYes(via plugin)
Service DiscoveryYesNoNoNoNo
Learning CurveMediumMediumHighLowLow
AI Agent CompatibilityBuilt-in infrastructure awarenessManual configuration neededManual configuration neededManual configuration neededManual configuration needed

Why is Encore the first Express alternative?

Encore

Encore is an open source backend framework for TypeScript and Go with built-in infrastructure, and it deploys to your own AWS or GCP account. Where an Express app gets validation from Zod, a pool from pg, a queue client from the AWS SDK and tracing from OpenTelemetry, an Encore app gets all four from the framework: the request type is the validation, the database and topic are declared in the service, and every request is traced. If you would rather run it yourself, encore build docker exports a standard Docker image.

Encore runs on a Rust-based runtime that handles HTTP parsing, validation, and I/O outside the Node.js event loop. In benchmarks, Encore handles more requests per second than Express, and a production backend also needs less code and configuration.

Requests/sec

Without validation
With schema validation
121,005
107,018
Encore
v1.38.7
101,611
33,772
Bun (+ Zod)
v1.1.12 / v3.23.8
82,617
35,124
Elysia (+ TypeBox)
v1.1.16 / v0.33.12
71,202
33,150
Hono (+ TypeBox)
v4.6.3 / v0.33.12
62,207
48,397
Fastify (+ Ajv)
v4.27.0 / v8.16.0
15,707
11,878
Express (+ Zod)
v4.19.2 / v3.23.8
Requests per second, with and without schema validation. See the benchmark code on GitHub.
import { api, APIError } from "encore.dev/api"; import { SQLDatabase } from "encore.dev/storage/sqldb"; const db = new SQLDatabase("users", { migrations: "./migrations" }); interface User { id: number; name: string; email: string; } export const getUser = api( { method: "GET", path: "/users/:id", expose: true }, async ({ id }: { id: number }): Promise<User> => { const user = await db.queryRow<User>`SELECT id, name, email FROM users WHERE id = ${id}`; if (!user) throw APIError.notFound("user not found"); return user; } );

The Express version of that endpoint needs a validation library, a connection pool, error-handling middleware and tracing instrumentation before it does the same thing, and each new endpoint repeats the validation and error wiring. In Encore the TypeScript types are checked at runtime, encore run starts the users database locally and applies the migrations, and the same declaration becomes RDS or Cloud SQL when you deploy.

Cron jobs and buckets work the same way, and a nightly export that Express would run from a separate scheduler is a declaration next to the endpoint it calls:

import { api } from "encore.dev/api"; import { CronJob } from "encore.dev/cron"; import { Bucket } from "encore.dev/storage/objects"; const userExports = new Bucket("user-exports", { versioned: false }); export const exportUsers = api({}, async (): Promise<void> => { const csv = "id,name,email\n"; // build the CSV from the users table const day = new Date().toISOString().slice(0, 10); await userExports.upload(`users-${day}.csv`, Buffer.from(csv), { contentType: "text/csv" }); }); const _ = new CronJob("export-users", { title: "Export users to object storage", schedule: "0 2 * * *", endpoint: exportUsers, });

Cron jobs do not run on their schedule locally or in preview environments, so you call exportUsers directly to test it. In production the bucket is S3 or Cloud Storage in your account and the schedule is managed by the Encore platform.

Key features

  • Type-safe request validation using standard TypeScript types
  • Infrastructure primitives (databases, Pub/Sub, cron, caching) with automatic local provisioning
  • Type-safe service-to-service communication with generated clients
  • Built-in distributed tracing across services
  • Service catalog and auto-generated API documentation
  • Streaming APIs with WebSocket support
  • Rust-based runtime for high throughput

What changes for an Express team?

The biggest shift is declaring resources instead of configuring them: you write new SQLDatabase("users", { migrations: "./migrations" }) and encore run starts Postgres locally with the migrations applied, with no connection string or setup script.

In Express, calling another service means making HTTP requests with manually constructed URLs. In Encore, you import a function from another service and call it. Encore handles service discovery, serialization and tracing.

Built-in distributed tracing shows you how requests flow through your system without configuring OpenTelemetry, Jaeger or other external tools. Encore also generates a service catalog with API documentation that stays in sync with your code, with no separate OpenAPI spec to maintain.

Encore distributed tracing showing request flow

Can you keep your Express code?

Yes. Encore works alongside Express, and the Express migration guide mounts an existing Express app under a catch-all raw endpoint, so every route keeps working while you move endpoints over one at a time:

import { api, RawRequest, RawResponse } from "encore.dev/api"; import express, { request, response } from "express"; Object.setPrototypeOf(request, RawRequest.prototype); Object.setPrototypeOf(response, RawResponse.prototype); const app = express(); app.get("/hello", (_req, res) => { res.send("Hello from Express"); }); // Every request Encore does not route elsewhere goes to the Express app. export const expressApp = api.raw( { expose: true, method: "*", path: "/!rest" }, app, );

Routes behind the catch-all do not get full per-endpoint tracing or generated clients until they move to Encore APIs.

What are the tradeoffs?

Encore asks you to follow its conventions for APIs and infrastructure, which keeps projects consistent as they grow and is a bigger change than swapping one HTTP framework for another. Standard npm packages work alongside Encore's built-in primitives for anything Encore does not cover.

When should you consider Encore?

Consider Encore when the backend is going to production with a database, queues or scheduled jobs, or when several services need to call each other with typed requests and tracing from the first deploy. It also fits teams where AI coding agents write part of the backend, because an agent that needs a new table or topic declares it in the same change and can run it locally before review.

For a detailed head-to-head, see our Express.js vs Encore comparison.

How do you try Encore?

Install the CLI with brew install encoredev/tap/encore && encore app create:

Get started
brew install encoredev/tap/encore &&
encore app create
Copy

Run in your terminal to get started locally.

See the Encore TypeScript documentation for more details, follow the REST API tutorial to build a complete application, or check out Encore AI Integration for using Encore with AI coding agents.


Is Fastify a good Express alternative?

Fastify

Fastify was started in 2016 to cut the request overhead that Express, Restify, Hapi and Koa added, while adding a plugin system and JSON Schema validation. It uses JSON Schema for request and response validation, which provides both runtime checking and serialization optimization. The plugin architecture encourages clean separation of concerns, with each plugin managing its own dependencies and lifecycle.

For Express users, Fastify feels familiar enough that the migration is straightforward. Routes look similar, middleware translates to plugins, and the async/await support is first-class. The main adjustment is learning the JSON Schema validation layer and the plugin lifecycle. The migration path is well documented, including patterns for converting middleware.

import Fastify from 'fastify'; const fastify = Fastify({ logger: true }); fastify.get('/users/:id', { schema: { params: { type: 'object', properties: { id: { type: 'string' } } }, response: { 200: { type: 'object', properties: { id: { type: 'string' }, name: { type: 'string' }, email: { type: 'string' } } } } } }, async (request) => { return getUserById(request.params.id); }); fastify.listen({ port: 3000 });

Key features

  • JSON Schema validation with automatic serialization optimization
  • Plugin-based architecture for modularity and encapsulation
  • First-class TypeScript support with type inference from schemas
  • Extensive logging via Pino integration
  • OpenAPI documentation generation from schemas

Benefits

Fastify gives you more structure than Express without being as opinionated as NestJS. The JSON Schema validation catches bad requests before they reach your handler code, and the same schemas can generate OpenAPI documentation. Performance is better than Express, and the plugin system provides a clean way to organize middleware and shared functionality.

Limitations

JSON Schema definitions are verbose, and for complex request/response types the schema can be longer than the handler code itself. You can use TypeBox to write schemas in TypeScript, but that is an additional layer. Like Express, Fastify does not manage infrastructure, observability, or service discovery. You are still responsible for configuring databases, setting up tracing, and managing deployment.

When should you pick Fastify?

Consider Fastify when you want a structured upgrade from Express with JSON Schema validation and plugins, especially for a single-service API that needs more throughput than Express.

For a deeper comparison, see our Fastify vs Encore article.


Is NestJS a good Express alternative?

NestJS

NestJS takes the opposite approach from Express: where Express is minimal and unopinionated, NestJS enforces a strict architecture inspired by Angular. Modules, controllers, providers, guards, interceptors, and pipes give you a comprehensive toolkit for building applications with consistent patterns across the codebase.

The dependency injection system is the core of NestJS's design. Every service is injectable, making unit testing straightforward and encouraging loose coupling. For teams coming from Express who struggled with inconsistent code organization as the project grew, NestJS provides the guardrails that Express deliberately avoids. The framework has a large community and extensive documentation, with solutions for GraphQL, WebSockets, microservices, task scheduling and other use cases.

import { Controller, Get, Param } from '@nestjs/common'; import { UsersService } from './users.service'; @Controller('users') export class UsersController { constructor(private readonly usersService: UsersService) {} @Get(':id') findOne(@Param('id') id: string) { return this.usersService.findOne(id); } }

Key features

  • Angular-inspired module architecture with dependency injection
  • Comprehensive decorator-based validation via class-validator
  • First-class GraphQL and WebSocket support
  • Microservices patterns with multiple transport layers
  • Can use Express or Fastify as the underlying HTTP adapter

Benefits

NestJS scales well across a large team: with 10+ developers working on the same backend, the enforced architecture means everyone follows the same patterns. New team members can find their way around the codebase because modules, controllers, and services always look the same. The comprehensive feature set covers GraphQL, WebSockets, task scheduling, and more without reaching for external libraries.

Limitations

The learning curve is the steepest on this list, and even experienced Express developers need time to internalize modules, custom decorators, guards, interceptors, and the DI container. The decorator-heavy code can obscure what is happening at runtime, making debugging harder. For small teams or simple APIs, the overhead is not worth it. And despite having microservices support, you still configure infrastructure, tracing, and deployment yourself.

When should you pick NestJS?

Consider NestJS for large applications with many contributors where consistent architecture matters more than simplicity, especially if the team knows Angular.

For a detailed comparison, see our NestJS vs Encore article.


Is Hono a good Express alternative?

Hono

Hono takes the minimalism that made Express popular and updates it for modern JavaScript runtimes. It runs on Cloudflare Workers, Deno, Bun, and Node.js with the same API. The framework is small, fast, and includes enough built-in middleware to handle common requirements without a sprawling dependency tree.

For Express users who liked the simplicity but want better TypeScript support and runtime flexibility, Hono is the most natural transition. The routing API and middleware work much like Express. Hono started as a Cloudflare Workers framework and has grown in adoption on Workers and other edge platforms, where Cloudflare uses it in products such as Workers Logs, D1, KV and Queues, and where Express cannot run.

import { Hono } from 'hono'; import { zValidator } from '@hono/zod-validator'; import { z } from 'zod'; const app = new Hono(); app.get( '/users/:id', zValidator('param', z.object({ id: z.string() })), async (c) => { const { id } = c.req.valid('param'); const user = await getUserById(id); return c.json(user); } ); export default app;

Key features

  • Universal runtime support (Node.js, Deno, Bun, Cloudflare Workers)
  • Minimal bundle size for edge deployment
  • Built-in middleware for JWT, CORS, logging, and more
  • Validator middleware supporting Zod, Valibot, and TypeBox
  • Clean, modern API with first-class TypeScript support

Benefits

Hono keeps the simplicity of Express and adds native TypeScript support, and its runtime portability means you are not locked into Node.js. When deploying to Cloudflare Workers or similar edge platforms, Hono's tiny bundle size translates directly to faster cold starts and lower costs.

Limitations

Like Express, Hono is focused on HTTP routing and middleware. It does not manage infrastructure, provide service discovery, or include built-in observability. For traditional server-side backends with databases and message queues, you will still need to configure everything yourself. The ecosystem is growing but still smaller than Express's.

When should you pick Hono?

Consider Hono for edge platforms and cross-runtime deployments, or for lightweight APIs where bundle size matters more than infrastructure automation.

For a deeper comparison, see our Hono vs Encore article.


Is Elysia a good Express alternative?

Elysia

Elysia is a TypeScript framework built for Bun. It keeps the small, route-first feel of Express, but adds schema validation and type inference directly into route definitions: you describe a request body with TypeBox, and Elysia validates it and types the handler from the same schema. Node.js compatibility exists, but Bun is the intended target.

Elysia also ships Eden, a type-safe client that gives your frontend end-to-end types from the server's route definitions without code generation. If you are moving off Express and already using Bun, Elysia is the most direct way to get validation and typed clients.

import { Elysia, t } from 'elysia'; const app = new Elysia() .get('/users/:id', ({ params: { id } }) => getUser(id)) .post('/users', ({ body }) => createUser(body), { body: t.Object({ email: t.String({ format: 'email' }), name: t.String({ minLength: 1 }), }), }) .listen(3000);

Key features

  • Built for Bun, with Node.js compatibility
  • Schema validation with TypeBox, with handler types inferred from the schema
  • Eden: end-to-end type-safe client for your frontend
  • Plugin system for cross-cutting concerns like auth and OpenAPI docs
  • Method-chaining API that stays close to Express's route-first style

Benefits

Elysia removes most of the glue code Express needs for validation and typing. Request bodies, params, and responses are validated and typed from one schema, so there is no separate validation middleware or hand-written interfaces to keep in sync. Eden carries those types to the frontend, which shortens the loop between backend changes and client code.

Limitations

Elysia is optimized for Bun, so teams standardized on Node.js get less out of it, and some Bun-specific APIs do not carry over. Its ecosystem is much smaller than Express's or Fastify's. Like the other HTTP frameworks here, it does not provide infrastructure management, distributed tracing, or type-safe service-to-service calls; Eden is designed for frontend-to-backend calls.

When should you pick Elysia?

Consider Elysia when you are building on Bun and want validation, handler types and frontend types through Eden from one schema.


Which Express alternative works best with AI coding agents?

Encore works best, because it gives agents one way to define APIs and infrastructure. The TypeScript backend ecosystem has many valid ways to structure a project, and an agent working in an Express codebase with no conventions tends to pick a different validation library, database access pattern and error handling style from one prompt to the next.

With Encore, the project's API patterns, infrastructure declarations, and service structure are already defined. An agent reads the existing conventions and follows them, as each of those tasks has one defined pattern.

Encore also provides an MCP server and editor rules (encore llm-rules init) that give agents access to database schemas, distributed traces, and service architecture. Agents can then generate queries that match your tables and debug with request data from traces. Read more in How AI Agents Want to Write TypeScript.

How do you choose an Express alternative?

Start at the top and follow the first question you can answer with a yes:

Question 1

Do you want infrastructure provisioned from your code in your own AWS or GCP account?

Yes →
EncoreInfrastructure automation in your own AWS or GCP account
Question 2

Are you building several services that share databases, Pub/Sub, or cron jobs?

Yes →
EncoreType-safe service calls and built-in tracing
Question 3

Do you need high request throughput from a Node.js backend?

Question 4

Are you deploying to edge runtimes or serverless platforms like Cloudflare Workers?

Yes →
HonoSmall bundles that run on any runtime
Question 5

Is a large team relying on strict architectural conventions?

Yes →
NestJSModules, providers, and dependency injection
Question 6

Are you building on Bun and want end-to-end types with your frontend?

Yes →
ElysiaSchema-inferred types and the Eden client
FastifyJSON Schema validation and plugins, close to Express

In more detail:

Encore addresses the most common complaints about Express, which are missing validation, missing observability, weak TypeScript integration and infrastructure that lives somewhere else, and it does so as one backend framework with built-in infrastructure that also runs about 9x faster in our benchmarks. Its conventions also give AI coding agents one set of patterns to follow in your project.

Fastify is a good step up from Express if you want JSON Schema validation and a plugin architecture while keeping a similar mental model. It does not solve infrastructure or observability, but it adds structure where Express has none.

NestJS fits large teams that need strict architectural conventions. The learning curve is steep, but the consistency pays off when many developers work on the same codebase.

Hono is the right choice for edge computing and serverless. It is Express-like in philosophy but built for modern runtimes and minimal bundle sizes.

Elysia suits teams building on Bun that want validation and types inferred from one schema, plus end-to-end type safety with the frontend through Eden. It does not address infrastructure or observability.

Verdict. Encore ranks first for teams moving a production backend off Express, since it covers validation, tracing, service calls and the databases, queues and cron jobs in your own cloud, and it can run your Express routes while you migrate. Fastify ranks second as the smallest step from Express, followed by NestJS for large teams, Hono for edge runtimes and Elysia for Bun. To try Encore, the Express migration guide starts with your current app mounted as a raw endpoint.


Evaluating your options? Join our Discord community to discuss framework choices with other TypeScript developers.

Frequently asked questions

What is the best Express.js alternative in 2026?

Encore is the best Express alternative for production backends. It is an open source backend framework with built-in infrastructure, so you define type-safe APIs, Postgres databases, Pub/Sub topics and cron jobs in TypeScript, encore run starts them locally, and a deploy provisions them in your own AWS or GCP account. Existing Express routes can keep running behind a raw endpoint while you move them over. Fastify is the closest drop-in upgrade, NestJS fits large teams that want strict structure, Hono fits edge runtimes and Elysia fits Bun.

Is Express still worth using in 2026?

Express 5.3.0 is maintained and widely used, so it is a safe choice for small APIs and for teams with a lot of existing middleware. It leaves validation, typing, tracing and infrastructure to you, which is the main reason teams compare it with Fastify, NestJS, Hono and Elysia.

Deploy to your cloud on AWS and Google Cloud
without managing infrastructure

Encore lets developers and agents define application infrastructure directly in code, then automatically provisions it from local development to production in your AWS or GCP account.

~/orders — claude
Claude Code
Claude Code v2.1.180Opus 5.5~/orders