Why Hono
Performance
| Framework | Requests/sec | Size |
|---|---|---|
| Hono | 130,000 | 14KB |
| Express | 45,000 | 200KB+ |
| Fastify | 75,000 | 100KB+ |
| Koa | 50,000 | 60KB+ |
Multi-Runtime Support
// Same code runs everywhere:
// - Cloudflare Workers
// - Deno
// - Bun
// - Node.js
// - Vercel Edge Functions
// - AWS Lambda
// - Netlify EdgeMiddleware Ecosystem
import { cors } from "hono/cors";
import { jwt } from "hono/jwt";
import { logger } from "hono/logger";
import { cache } from "hono/cache";
import { compress } from "hono/compress";
app.use("*", cors());
app.use("*", logger());
app.use("/api/*", jwt({ secret: "my-secret" }));AI API Pattern
import { Hono } from "hono";
import { stream } from "hono/streaming";
const app = new Hono();
app.post("/api/stream", async (c) => {
return stream(c, async (stream) => {
const response = await fetch("https://api.anthropic.com/v1/messages", {
method: "POST",
headers: { "x-api-key": c.env.API_KEY },
body: JSON.stringify({ model: "claude-sonnet-4-20250514", stream: true, messages: [...] }),
});
for await (const chunk of response.body) {
await stream.write(chunk);
}
});
});RPC Mode (Type-Safe Client)
// Server
const route = app.get("/api/users/:id", (c) => c.json({ name: "Alice" }));
// Client (auto-typed)
import { hc } from "hono/client";
const client = hc<typeof route>("http://localhost:3000");
const res = await client.api.users[":id"].$get({ param: { id: "1" } });Key Stats
- 22,000+ GitHub stars
- 14KB, zero dependencies
- 7 runtime targets
- 3x faster than Express
- Built-in RPC type safety
FAQ
Q: What is Hono? A: Hono is an ultra-lightweight TypeScript web framework that runs on every JavaScript runtime — Cloudflare Workers, Deno, Bun, Node.js, and more — at 3x the speed of Express.
Q: Is Hono free? A: Yes, fully open-source under MIT license.
Q: Can I migrate from Express to Hono? A: Yes, Hono has similar routing syntax. Most Express middleware patterns have Hono equivalents.