{"schemaVersion":"1.0","record":{"label":"Hono","description":"MIT-licensed Web Standards HTTP framework with multi-runtime adapters, middleware, validation integrations and a typed client.","aliases":[],"kind":"software","website":"https://hono.dev","overview":"Hono is an open-source HTTP application framework built around Web Standards. It provides routing, request context, middleware and helpers for APIs and backend applications across several JavaScript runtimes. Its TypeScript client can share route types with a frontend. The framework supplies building blocks; application-specific data access, business rules and deployment configuration still have to be assembled.","license":"MIT","lifecycle":"active","example":false,"features":[{"name":"Multi-runtime HTTP routing","status":"supported","detail":"Web Standards APIs work across documented runtimes; Node.js uses an adapter and deployment integration remains runtime-specific.","useCase":"Building TypeScript HTTP APIs and application backends","platforms":["Web Standards JavaScript runtimes","Node.js through an adapter"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://hono.dev/docs","locator":"Use cases, Web Standards, middleware and runtime support","retrievedAt":"2026-10-07T23:00:05Z","kind":"vendor"},{"url":"https://hono.dev/docs/getting-started/nodejs","locator":"Node adapter and runtime-specific template","retrievedAt":"2026-10-07T23:00:41Z","kind":"vendor"}]},{"name":"Runtime request validation","status":"supported","detail":"Thin built-in validation can be combined with Zod or Standard Schema middleware; body parsing requires matching content type.","useCase":"Building TypeScript HTTP APIs and application backends","platforms":["Web Standards JavaScript runtimes","Node.js through an adapter"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://hono.dev/docs/guides/validation","locator":"Thin validator, content-type requirements, Zod and Standard Schema","retrievedAt":"2026-10-07T23:00:15Z","kind":"vendor"}]},{"name":"Typed client responses","status":"limited","detail":"RPC infers declared route input/output types; global errors need explicit type augmentation and do not appear automatically.","useCase":"Building TypeScript HTTP APIs and application backends","platforms":["Web Standards JavaScript runtimes","Node.js through an adapter"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://hono.dev/docs/guides/rpc","locator":"AppType, strict configuration and Global Response limitations","retrievedAt":"2026-10-07T23:00:51Z","kind":"vendor"}]},{"name":"Built-in CSRF middleware scope","status":"limited","detail":"Checks unsafe methods with form-compatible content types; it is not a blanket check of every request.","useCase":"Building TypeScript HTTP APIs and application backends","platforms":["Web Standards JavaScript runtimes","Node.js through an adapter"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://hono.dev/docs/middleware/builtin/csrf","locator":"Origin/Sec-Fetch-Site checks and eligible request types","retrievedAt":"2026-10-07T23:00:41Z","kind":"vendor"}]}],"alternatives":[],"slug":"hono","draftAlternatives":[{"targetSlug":"fastify","status":"limited","detail":"Can replace Fastify for a rewritten HTTP API, especially when a Web Standards runtime is desired. Handler/context, middleware and plugin APIs differ; Node-specific dependencies still need compatible deployment support.","useCase":"Building TypeScript HTTP APIs and application backends","platforms":["Web Standards JavaScript runtimes","Node.js through an adapter"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://hono.dev/docs","locator":"Use cases, Web Standards, middleware and runtime support","retrievedAt":"2026-10-07T23:00:05Z","kind":"vendor"},{"url":"https://hono.dev/docs/getting-started/nodejs","locator":"Node adapter and runtime-specific template","retrievedAt":"2026-10-07T23:00:41Z","kind":"vendor"},{"url":"https://fastify.dev/docs/latest/Reference/Middleware/","locator":"Node request/response middleware versus Fastify hooks","retrievedAt":"2026-10-07T23:01:01Z","kind":"vendor"}]}],"evidence":[{"url":"https://github.com/honojs/hono/blob/main/LICENSE","locator":"MIT permission and notice conditions","retrievedAt":"2026-10-07T23:00:26Z","kind":"vendor"},{"url":"https://hono.dev/docs","locator":"Use cases, Web Standards, middleware and runtime support","retrievedAt":"2026-10-07T23:00:05Z","kind":"vendor"},{"url":"https://hono.dev/docs/getting-started/nodejs","locator":"Node adapter and runtime-specific template","retrievedAt":"2026-10-07T23:00:41Z","kind":"vendor"},{"url":"https://hono.dev/docs/guides/validation","locator":"Thin validator, content-type requirements, Zod and Standard Schema","retrievedAt":"2026-10-07T23:00:15Z","kind":"vendor"},{"url":"https://hono.dev/docs/guides/rpc","locator":"AppType, strict configuration and Global Response limitations","retrievedAt":"2026-10-07T23:00:51Z","kind":"vendor"},{"url":"https://hono.dev/docs/middleware/builtin/csrf","locator":"Origin/Sec-Fetch-Site checks and eligible request types","retrievedAt":"2026-10-07T23:00:41Z","kind":"vendor"},{"url":"https://hono.dev/docs/guides/testing","locator":"Request/Response and runtime-specific test environments","retrievedAt":"2026-10-07T23:00:51Z","kind":"vendor"},{"url":"https://fastify.dev/docs/latest/Reference/Middleware/","locator":"Node request/response middleware versus Fastify hooks","retrievedAt":"2026-10-07T23:01:01Z","kind":"vendor"}],"document":{"version":1,"references":[{"url":"https://github.com/honojs/hono/blob/main/LICENSE","locator":"MIT permission and notice conditions","retrievedAt":"2026-10-07T23:00:26Z","id":"license","title":"Hono license","kind":"vendor"},{"url":"https://hono.dev/docs","locator":"Use cases, Web Standards, middleware and runtime support","retrievedAt":"2026-10-07T23:00:05Z","id":"intro","title":"Hono documentation","kind":"vendor"},{"url":"https://hono.dev/docs/getting-started/nodejs","locator":"Node adapter and runtime-specific template","retrievedAt":"2026-10-07T23:00:41Z","id":"node","title":"Hono on Node.js","kind":"vendor"},{"url":"https://hono.dev/docs/guides/validation","locator":"Thin validator, content-type requirements, Zod and Standard Schema","retrievedAt":"2026-10-07T23:00:15Z","id":"validation","title":"Hono validation","kind":"vendor"},{"url":"https://hono.dev/docs/guides/rpc","locator":"AppType, strict configuration and Global Response limitations","retrievedAt":"2026-10-07T23:00:51Z","id":"rpc","title":"Hono RPC","kind":"vendor"},{"url":"https://hono.dev/docs/middleware/builtin/csrf","locator":"Origin/Sec-Fetch-Site checks and eligible request types","retrievedAt":"2026-10-07T23:00:41Z","id":"csrf","title":"Hono CSRF protection","kind":"vendor"},{"url":"https://hono.dev/docs/guides/testing","locator":"Request/Response and runtime-specific test environments","retrievedAt":"2026-10-07T23:00:51Z","id":"testing","title":"Testing Hono","kind":"vendor"},{"url":"https://fastify.dev/docs/latest/Reference/Middleware/","locator":"Node request/response middleware versus Fastify hooks","retrievedAt":"2026-10-07T23:01:01Z","id":"fastify","title":"Fastify middleware","kind":"vendor"}],"overviewCitations":["intro","rpc"],"licenseCitations":["license"],"sections":[{"id":"runtime","heading":"Runtime and deployment model","paragraphs":[{"id":"runtime-detail","content":[{"text":"Hono routes operate through a context built around Web Request and Response concepts. The documentation lists edge and server runtimes, and Node.js support uses a dedicated adapter. Selecting a template is therefore an architectural choice: the framework's portability does not make a database driver, filesystem dependency or hosting configuration portable by itself. The useful substitution scope is HTTP request handling, with runtime-specific dependencies assessed separately."}],"citations":["intro","node"]}]},{"id":"validation","heading":"Validating actual requests","paragraphs":[{"id":"validation-detail","content":[{"text":"Hono's built-in validator is deliberately thin. A handler can validate a body, query, path parameter or header, while integrations provide richer schemas through libraries such as Zod and Standard Schema implementations. JSON and form validation require the appropriate Content-Type; otherwise the documented callback receives an empty object rather than the expected parsed body. Header-validation keys must be lowercase. These details matter in generated tests as much as in a frontend's real requests."}],"citations":["validation"]}]},{"id":"typed-client","heading":"Sharing route types with a client","paragraphs":[{"id":"typed-client-detail","content":[{"text":"RPC mode exports the type of the app or selected routes and gives that type to Hono's client. It infers declared inputs and JSON outputs, with strict TypeScript settings required on both sides in the documented monorepo setup. Global error handlers and middleware responses are not automatically inferred; the ApplyGlobalResponse helper supplies explicit declarations. As an assessment, compilation alone cannot demonstrate that every failure response or deployed server version matches a client's expectations."}],"citations":["rpc"]}]},{"id":"security","heading":"Security middleware has a defined scope","paragraphs":[{"id":"security-detail","content":[{"text":"The CSRF middleware checks Origin and Sec-Fetch-Site and permits a request if either check passes. Its checks apply to unsafe HTTP methods carrying form-compatible content types. The guide warns about environments where browser or proxy behavior removes the relevant headers and suggests a different token-based approach there. It should therefore be evaluated against the application's actual request paths and authentication model rather than described as universal CSRF coverage."}],"citations":["csrf"]}]},{"id":"tests","heading":"Testing generated endpoints","paragraphs":[{"id":"tests-detail","content":[{"text":"Hono can receive a constructed Request through app.request and return a Response for assertions. Its guide distinguishes the common request/response pattern from runtime-specific test environments, including Workers testing integration. This provides a practical way to verify an AI-generated route's status and body without assuming that a successful type check exercises it. Deployment-specific behavior still needs an appropriate environment."}],"citations":["testing"]}]},{"id":"license","heading":"Licensing and adoption","paragraphs":[{"id":"license-detail","content":[{"text":"Hono's repository is MIT-licensed, with copyright and permission notices required for covered copies or substantial portions. Hosting, external authentication services and third-party dependencies are separate choices. No hosted subscription is established as necessary merely to use the framework's covered source."}],"citations":["license","intro"]}]},{"id":"replacement","heading":"Substitution considerations","paragraphs":[{"id":"replacement-detail","content":[{"text":"Hono can replace "},{"text":"Fastify","targetSlug":"fastify"},{"text":" for HTTP APIs when routes and their supporting middleware are adapted. Hono's context and Web Standards approach differ from Fastify's request/reply and plugin lifecycle. The relationship does not imply compatibility with existing Fastify plugins, nor a measured performance advantage. No installation, deployment or security audit was performed for this article."}],"citations":["intro","fastify"]}]}]},"id":"Q221","revision":206,"updatedAt":"2026-10-10T15:06:51Z","sourceUrl":"https://substitutefor.net/entities/Q221?revision=206"}}