Why I reach for Hono over Express

Express shaped a generation of Node APIs. Why my new backends start with Hono instead, where it changes how I build, and when Express still wins.

Prabir Singh, profile photoPrabir Singh·
·Updated ·9 min read
Editorial illustration: A compact routing junction sends three paths through a small, clearly organized interchange.
In this article
  1. 01The type inference is the whole pitch
  2. 02It runs where I actually deploy
  3. 03The middleware model stays out of your way
  4. 04The framework matters less than the rules you hold
  5. 05When I still reach for Express
  6. 06The route is small; the responsibility is not
  7. 07Frequently asked questions
  8. 08Respect the old, start with the new

Express is the framework everyone learns first. It's also the one I quietly stopped starting projects with.

Not because Express is bad. It carried Node APIs for over a decade and earned every bit of that. But the ground moved under it. We ship to Bun, to Workers, to edge runtimes. We write TypeScript by default. We expect the thing underneath us to know what a Response actually is. Express predates most of that, and you feel the gap on day one of a fresh build.

Hono calls itself a small, simple, and ultrafast web framework built on Web Standards. That last part is the one that matters. Here's the honest version of why my APIs start there now.

The type inference is the whole pitch

With Express, your handler gets (req, res), and both are loosely typed until you bolt on @types/express and hope the casts hold. With Hono, the types flow. Route params, validated bodies, context values: all of it is known at compile time.

Route params the compiler can see

import { Hono } from "hono"
 
const app = new Hono()
 
app.get("/posts/:id", (c) => {
  const id = c.req.param("id") // string, inferred from the route, no casting
  return c.json({ id })
})

That c.req.param("id") is typed because the route string itself is part of the type. Rename the param and the compiler flags every stale reference. That's the difference between finding a bug in your editor and finding it in production logs at 2am.

Validation that carries its own types

Pair it with a schema validator and the inference reaches all the way into your handler body. The Hono validation guide covers the options; Zod is my default.

import { zValidator } from "@hono/zod-validator"
import { z } from "zod"
 
const schema = z.object({ title: z.string().min(1) })
 
app.post("/posts", zValidator("json", schema), (c) => {
  const body = c.req.valid("json") // { title: string }
  return c.json(body, 201)
})

No manual parsing. No req.body as CreatePostDto. The validated shape is the type.

Types that reach the client

This is the part that made me stop looking back. With Hono RPC, you export the app's type from the server and hand it to a tiny client. The client then knows every route, every input, and every response shape. Your frontend autocompletes your backend. It's the same idea behind TypeScript from the phone to the database, applied right at the seam where most bugs hide.

It runs where I actually deploy

Express assumes Node. Hono assumes the web standard Request and Response. Portable route code, provided its dependencies and platform APIs also support the target runtime. Hono's own Web Standards page lists Node.js, Bun, Deno, Cloudflare Workers, Fastly Compute, AWS Lambda, and Vercel among its targets.

ExpressHono
RuntimeNode.jsNode.js, Bun, Deno, Workers, Lambda, edge
Request modelCustom req / res objectsWeb Request / Response
RoutingMiddleware stack matched in orderSmartRouter picks RegExpRouter or TrieRouter at startup
TypeScriptCommunity type definitionsWritten in TypeScript, inference built in
Typed clientBring your ownBuilt-in RPC client
EcosystemHuge, mature, everywhereSmaller, covers the essentials

Bun, without the glue

On a racket sports platform, the API is a Hono app running natively on Bun. Express would have worked. Hono meant less glue, and a mistyped route parameter became a compile error instead of a 500 at midnight. The BIM browser viewer follows the same pattern: its processing service is Hono on Bun, with thin routes and every external dependency behind an injectable seam.

A portable router is a start, not the whole migration

When traffic is spiky and global, moving an API closer to users shouldn't mean rewriting it. Hono reduces the routing work involved, but database drivers, filesystem access, background jobs, execution limits and connection latency still need checking. Deploy a representative route before calling a migration easy. A nearby API with a faraway database can still spend its day waiting.

The middleware model stays out of your way

Express middleware mutates req and calls next(). It works. But the data flow is invisible. By the time your handler runs, you never quite know what's been stapled onto req, or by whom.

Typed context, not mystery properties

Hono middleware sets values on the context, and you can type them up front through the context Variables generic.

type Env = { Variables: { userId: string } }
 
const app = new Hono<Env>()
 
app.use(async (c, next) => {
  c.set("userId", "u_123") // must be a string, the compiler checks
  await next()
})
 
app.get("/me", (c) => c.json({ userId: c.get("userId") })) // typed as string

The chain reads like a sentence, and the compiler knows what each step added.

The honest caveat

Typing isn't magic. The Hono docs themselves warn that if you declare context variables globally, the types apply everywhere, even on routes where the middleware never ran, so an undefined can slip past unnoticed. I keep variables scoped to the routers that actually set them. Types are a promise. Only make promises you keep.

The framework matters less than the rules you hold

Here's the part that surprised me. The best API decision I made on the racket sports platform wasn't Hono. It was a two-function rule: every response goes out through a success() or error() helper, so the envelope is identical on every endpoint. Frontends check one field to know if a call worked.

Thin routes, fat services

Routes validate input and hand off. Services hold the business logic. The database layer talks to Postgres through Drizzle. Hono makes that layering pleasant, and it doesn't enforce it. You do.

Why that matters for picking a framework

A great framework with sloppy conventions loses to an average one with strict conventions, every time. Hono earns its place because it makes the strict version cheaper to write, not because it writes it for you.

When I still reach for Express

I'm not here to sell you a rewrite. Express 5 closed some real gaps: according to the Express 5 migration guide, handlers that return rejected promises now forward the error to your error middleware automatically. That was one of the oldest papercuts in the framework, and it's fixed.

Keep Express when

  • You have a mature Express app and a team that knows it cold. The framework is not your bottleneck. Ship features.
  • You depend on a library that only ships Express middleware, and replacing it costs more than the type safety saves.
  • The service is single-region, Node-only, and unlikely to move.

Start with Hono when

New services, anything on Bun or an edge runtime, and any API where a typed client will save the frontend team real hours. That's most of what I build. It might not be most of what you build, and that's completely fine.

The route is small; the responsibility is not

Suppose a customer submits the same checkout twice because the first response disappears. A typed Hono client can tell you the response shape. It cannot decide whether that second request should create another order. Nor can it patch the runtime underneath it: the October 2026 Node.js security release was a reminder that a tidy route still runs on native code someone has to keep updated.

For a payment-related endpoint, I would write these acceptance cases before polishing the handler:

RequestExpected behaviour
Malformed quantityValidation error; no database write
Valid input, wrong merchantAccess denied; no information about another merchant's order
Same operation retriedReturn the existing result or a clear in-progress state
Same operation key, different payloadReject the mismatch
Provider timeoutPreserve a recoverable state; don't guess whether money moved

Keep the operation key stable across retries and enforce its uniqueness transactionally. Generating a fresh key on every retry is a duplicate-order generator wearing an idempotency badge.

This is where I keep framework code thin: parse, authenticate, authorise, call the domain operation, map the result. Hono RPC helps clients use that contract. OWASP's authorisation guidance explains why permissions still need checking on every request. The food-delivery architecture shows why this separation matters once several apps share an API.

Frequently asked questions

Is Hono production ready?

I run it in production. The racket sports platform's API and the BIM viewer's processing service are both Hono on Bun, handling bookings, payments, and heavy model conversion. It's actively maintained and the core API has been stable in my work.

Do I have to rewrite my Express app to try it?

No. Hono can mount inside a Next.js route handler or run as a separate service beside your existing one. Start with one new endpoint, feel the difference, then decide whether the rest is worth moving.

What about the ecosystem?

Smaller than Express, and the essentials are there: validation, auth, CORS, rate limiting. Because Hono speaks web standards, a lot of platform-native tooling works without a Hono-specific adapter. If you need a niche Express plugin, check for an equivalent before you commit.

Does the edge actually matter for my project?

Only if your users are spread out or your traffic spikes hard. For a single-region internal tool, the edge is a nice-to-have. The type safety is the reason to switch either way.

Is Hono faster than Express?

Hono's router is built for speed and the framework stays small. In most apps I build, though, the database query dominates response time, not the router. Pick Hono for the types and portability, and treat the speed as a bonus.

Should I pair Hono with Next.js or TanStack Start?

Both work, because both can hand a request to a Hono app. I compared the two frameworks in Next.js vs TanStack Start, and the short answer is that Hono fits either one without fuss.

Respect the old, start with the new

Express taught Node how to serve HTTP. Hono assumes you already know that and hands you types that reach the client, portability across runtimes, and a middleware chain you can actually read. I still respect Express. I just don't start there anymore. If you're weighing a backend for something new, here's how I pick a stack, and if you want a second opinion on yours, tell me what you're building and I'll tell you honestly what I'd keep.

Was this useful?

No account needed. One like per browser; click again to undo.

ShareXLinkedInFacebook
Prabir Singh, profile photo

Prabir Singh

Full-stack engineer in Mumbai. Twenty years in sales taught me why people buy; seven years of code taught me how to build what they'll pay for. I still read error messages the way I once read objections: as the most honest feedback of the day. More about me or start a project.

Keep reading