← Back to articles

Nitro vs H3 vs Hono: Best Lightweight Server Framework (2026)

Express is showing its age. If you want a modern, lightweight HTTP server for APIs, edge functions, or serverless — Nitro, H3, and Hono are the three frameworks worth evaluating.

Quick Comparison

FeatureNitroH3Hono
ByUnJS (Nuxt team)UnJS (Nuxt team)Yusuke Wada + community
RelationshipBuilt on H3StandaloneStandalone
FocusFull server toolkitMinimal HTTPMinimal HTTP + middleware
Edge supportCloudflare, Deno, Bun, VercelUniversalCloudflare, Deno, Bun, Vercel, Lambda
File-based routingYesNoNo (via hono/routing)
Auto-importsYesNoNo
DatabaseVia integrationsBYOBYO
OpenAPIVia pluginNoBuilt-in (Zod OpenAPI)
TypeScriptFirst-classFirst-classFirst-class
Bundle size~50KB~15KB~15KB

H3: The Minimal Foundation

H3 is a minimal HTTP framework from the UnJS ecosystem (the team behind Nuxt). It's designed to be tiny, fast, and universally deployable.

Strengths

  • Ultra-minimal. ~15KB. Does HTTP handling and nothing else.
  • Universal. Runs on Node.js, Bun, Deno, Cloudflare Workers, and any Web Standards-compatible runtime.
  • Web Standards. Uses Request/Response objects. Your code is portable.
  • Composable. Small utility functions instead of heavy middleware chains.
  • Battle-tested. Powers Nuxt's server layer — used by millions of Nuxt apps.

Weaknesses

  • Too minimal for most apps. No routing helpers, no middleware ecosystem, no built-in validation.
  • Small standalone community. Most H3 users interact through Nitro or Nuxt, not directly.
  • Documentation is thin. Focused on API reference, less on guides and tutorials.

Best For

Building your own framework or library on top of a minimal HTTP layer. Direct use is rare — most developers want Nitro or Hono instead.

Nitro: The Full Server Toolkit

Nitro is H3 with batteries included. It adds file-based routing, auto-imports, caching, storage, tasks, and universal deployment.

Strengths

  • File-based API routes. Drop a file in routes/, get an endpoint. Convention over configuration.
  • Universal deployment. One codebase deploys to Node.js, Cloudflare, Deno, Bun, Vercel, Netlify, AWS Lambda — 15+ presets.
  • Built-in features. Caching, key-value storage, scheduled tasks, WebSocket support, database integrations.
  • Auto-imports. Event handlers, utilities, and composables are auto-imported. Less boilerplate.
  • Production-ready. Powers Nuxt's server — battle-tested at scale.
// server/routes/hello.ts
export default defineEventHandler((event) => {
  return { hello: 'world' }
})

Weaknesses

  • Opinionated. If you don't like file-based routing or auto-imports, Nitro fights you.
  • Larger than alternatives. ~50KB vs ~15KB for H3/Hono.
  • UnJS ecosystem coupling. Uses unstorage, unenv, etc. Good if you're in the ecosystem, another dependency tree if not.
  • Less flexible routing than Hono's pattern-based router.

Best For

Backend APIs, BFF (Backend for Frontend) layers, and serverless functions that need to deploy everywhere. Especially good if you're already in the Nuxt/UnJS ecosystem.

Hono: The Edge-First Framework

Hono started as a Cloudflare Workers framework and expanded to run everywhere. It's the most popular lightweight framework in the edge computing ecosystem.

Strengths

  • Best routing. Multiple router options (RegExpRouter, TrieRouter, SmartRouter) — fastest regex-free routing in benchmarks.
  • Rich middleware ecosystem. CORS, JWT, bearer auth, logger, pretty JSON, ETag, cache, compress — all built-in.
  • OpenAPI + Zod. First-class OpenAPI spec generation with Zod validation. Generate type-safe API clients automatically.
  • JSX support. Render HTML with JSX on the server. Build simple pages without a frontend framework.
  • RPC client. Type-safe API client generated from your Hono routes (like tRPC but for HTTP).
  • Massive community. 20K+ GitHub stars, active development, growing ecosystem.
import { Hono } from 'hono'
import { zValidator } from '@hono/zod-validator'
import { z } from 'zod'

const app = new Hono()

app.get('/hello/:name', 
  zValidator('param', z.object({ name: z.string() })),
  (c) => c.json({ hello: c.req.valid('param').name })
)

export default app

Weaknesses

  • No file-based routing out of the box (available via community packages).
  • No auto-imports. Explicit imports everywhere.
  • No built-in storage/caching abstractions (use platform-specific solutions).
  • Not as "full-featured" as Nitro for complex server applications.

Best For

APIs, edge functions, and any HTTP server where you want the best routing, middleware ecosystem, and TypeScript experience. The default choice for Cloudflare Workers.

Performance Benchmarks

FrameworkRequests/sec (simple JSON)Router performance
H3~80KGood
Hono (RegExpRouter)~90KBest
Nitro~70KGood (H3-based)
Express~15KAdequate

All three are 4-6x faster than Express. The differences between H3, Hono, and Nitro are negligible for real-world applications where database queries dominate response time.

When to Use Each

Use H3 When:

  • Building a library or meta-framework
  • You want the absolute minimum abstraction
  • You're contributing to the UnJS ecosystem

Use Nitro When:

  • You want file-based API routing
  • You need universal deployment without config
  • You're in the Nuxt/UnJS ecosystem
  • You want built-in caching, storage, and tasks

Use Hono When:

  • You're building REST APIs with OpenAPI
  • Edge-first deployment (Cloudflare Workers especially)
  • You want the best routing and middleware ecosystem
  • You want type-safe RPC clients from your API

FAQ

Should I use Hono or Express for a new project?

Hono. It's faster, more modern, better typed, and deploys to more platforms. Express is legacy at this point.

Can I use Nitro without Nuxt?

Yes. Nitro is a standalone framework. npx giget@latest nitro my-app creates a Nitro project without Nuxt.

Which is best for Cloudflare Workers?

Hono. It was born there, has the best integration, and the largest Cloudflare community.

Can I migrate from Express to Hono?

Yes. Hono has an Express-compatibility adapter. You can migrate incrementally.

The Verdict

  • H3 for framework authors and the absolute minimum.
  • Nitro for full-featured server apps with universal deployment.
  • Hono for APIs, edge functions, and the best DX. The default choice for most new projects in 2026.

Get AI tool guides in your inbox

Weekly deep-dives on the best AI coding tools, automation platforms, and productivity software.