# Hono > Hono is a small web framework built on Web Standards, with quick start commands and support for many runtimes and deployment targets. Its documentation covers the API (the Hono object, routing, Context, HonoRequest, HTTPException, presets), concepts like middleware, routers, benchmarks, developer experience and Web Standards, and getting-started guides for platforms such as Cloudflare Workers, Deno, Bun, Node.js, AWS Lambda, Vercel, and Netlify. It also documents helpers, built-in and third-party middleware, and guides for testing, validation, JSX, RPC, and migrating to v5. Docs source: https://hono.dev/docs. Full text: https://skilldock.vibiz.app/d/hono-dev-docs/llms-full.txt. MCP server: https://skilldock.vibiz.app/mcp/hono-dev-docs. ## Overview - [Hono - Web framework built on Web Standards](https://hono.dev/docs): Introduces Hono as a small web framework and shows quick start commands. ## Middleware - [Basic Auth Middleware](https://hono.dev/docs/middleware/builtin/basic-auth): Apply Basic authentication to specified Hono paths using username and password credentials. - [Bearer Auth Middleware](https://hono.dev/docs/middleware/builtin/bearer-auth): Protect Hono routes by verifying Bearer tokens in the Authorization request header. - [Body Limit Middleware](https://hono.dev/docs/middleware/builtin/body-limit): Limit request body file size and handle oversized uploads with a custom error response. - [Cache Middleware](https://hono.dev/docs/middleware/builtin/cache): Add Cache API middleware to cache responses on Cloudflare Workers custom domains and Deno. - [Combine Middleware](https://hono.dev/docs/middleware/builtin/combine): Combine multiple Hono middleware functions with some, every, and except helpers. - [Compress Middleware](https://hono.dev/docs/middleware/builtin/compress): Compress Hono response bodies with gzip or deflate based on Accept-Encoding headers. - [Context Storage Middleware](https://hono.dev/docs/middleware/builtin/context-storage): Store Hono Context in AsyncLocalStorage and retrieve it globally with getContext. - [CORS Middleware](https://hono.dev/docs/middleware/builtin/cors): Configure CORS headers for Hono routes to allow cross-origin requests from front-end applications. - [CSRF Protection](https://hono.dev/docs/middleware/builtin/csrf): Protect Hono routes from CSRF attacks by validating Origin and Sec-Fetch-Site headers. - [ETag Middleware](https://hono.dev/docs/middleware/builtin/etag): Add ETag headers to Hono responses and configure retained headers for 304 responses. - [IP Restriction Middleware](https://hono.dev/docs/middleware/builtin/ip-restriction): Restrict Hono route access using IP allow lists and deny lists with getConnInfo. - [JSX Renderer Middleware](https://hono.dev/docs/middleware/builtin/jsx-renderer): Set up JSX layouts for c.render and access Context inside components with useRequestContext. - [JWK Auth Middleware](https://hono.dev/docs/middleware/builtin/jwk): Authenticate requests by verifying JWT tokens against JSON Web Key sets and configured algorithms. - [JWT Auth Middleware](https://hono.dev/docs/middleware/builtin/jwt): Add JWT authentication middleware that verifies tokens from Authorization headers or cookies. - [Language Middleware](https://hono.dev/docs/middleware/builtin/language): Use the language detector middleware to determine a user's preferred language from query, cookie, header, or path for i18n. - [Logger Middleware](https://hono.dev/docs/middleware/builtin/logger): Add logging middleware to log incoming requests and outgoing responses with status codes and elapsed time. - [Method Not Allowed Middleware](https://hono.dev/docs/middleware/builtin/method-not-allowed): Return 405 Method Not Allowed with an Allow header for unsupported methods on registered routes using middleware. - [Method Override Middleware](https://hono.dev/docs/middleware/builtin/method-override): Override the HTTP method of a request using a form field, header, or query parameter with method override middleware. - [Mount Middleware](https://hono.dev/docs/middleware/builtin/mount): Mount an application built with another framework into a Hono app using the mount middleware. - [Pretty JSON Middleware](https://hono.dev/docs/middleware/builtin/pretty-json): Enable pretty printing of JSON responses via a query parameter using the pretty JSON middleware. - [Request ID Middleware](https://hono.dev/docs/middleware/builtin/request-id): Generate a unique request ID for each request and access it in handlers with the request ID middleware. - [Secure Headers Middleware](https://hono.dev/docs/middleware/builtin/secure-headers): Configure security response headers with default settings and per-header overrides or suppression. - [Timeout Middleware](https://hono.dev/docs/middleware/builtin/timeout): Set a maximum duration for requests and handle timeouts with custom error responses using the timeout middleware. - [Server-Timing Middleware](https://hono.dev/docs/middleware/builtin/timing): Add Server-Timing headers with performance metrics using the timing middleware for request profiling. - [Trailing Slash Middleware](https://hono.dev/docs/middleware/builtin/trailing-slash): Add or remove trailing slashes on GET request URLs with appendTrailingSlash and trimTrailingSlash middleware. - [Third-party Middleware](https://hono.dev/docs/middleware/third-party): Browse third-party Hono middleware packages for authentication and other external library integrations. ## Getting Started - [Alibaba Cloud Function Compute](https://hono.dev/docs/getting-started/ali-function-compute): Shows running Hono on Alibaba Cloud Function Compute with a third-party adapter. - [AWS Lambda](https://hono.dev/docs/getting-started/aws-lambda): Explains deploying Hono to AWS Lambda using CDK and the AWS Lambda adapter. - [Azure Functions](https://hono.dev/docs/getting-started/azure-functions): Guides deploying Hono on Azure Functions using the Azure Functions adapter. - [Getting Started](https://hono.dev/docs/getting-started/basic): Walks through creating, developing, and deploying a Hono project from templates. - [Bun](https://hono.dev/docs/getting-started/bun): Explains setting up and running a Hono project on the Bun runtime. - [Tencent CloudBase](https://hono.dev/docs/getting-started/cloudbase): Guides running Hono on Tencent CloudBase HTTP Cloud Functions with Node.js. - [Cloudflare Pages](https://hono.dev/docs/getting-started/cloudflare-pages): Set up Hono on Cloudflare Pages and review deprecation warning recommending Workers instead. - [Cloudflare Workers](https://hono.dev/docs/getting-started/cloudflare-workers): Build and deploy a Hono application on Cloudflare Workers with Wrangler and TypeScript. - [Cloudflare Workers + Vite](https://hono.dev/docs/getting-started/cloudflare-workers-vite): Shows creating a full-stack Hono app on Cloudflare Workers with Vite. - [Deno](https://hono.dev/docs/getting-started/deno): Run and deploy a Hono application on Deno with a TypeScript setup. - [Fastly Compute](https://hono.dev/docs/getting-started/fastly): Create and deploy a Hono application on Fastly Compute using the Fastly CLI. - [Google Cloud Run](https://hono.dev/docs/getting-started/google-cloud-run): Guides deploying Hono on Google Cloud Run using containers and gcloud CLI. - [Lambda@Edge](https://hono.dev/docs/getting-started/lambda-edge): Shows deploying Hono to Lambda@Edge using CDK and the adapter. - [Netlify](https://hono.dev/docs/getting-started/netlify): Create a Hono application for Netlify Edge Functions and deploy using Netlify CLI. - [Next.js](https://hono.dev/docs/getting-started/nextjs): Run Hono on Next.js using the Node.js runtime and deploy with Vercel Functions. - [Node.js](https://hono.dev/docs/getting-started/nodejs): Run Hono on Node.js using the Node.js adapter and required versions. - [Service Worker](https://hono.dev/docs/getting-started/service-worker): Run Hono applications as FetchEvent handlers inside a browser Service Worker using a Vite project setup. - [Supabase Edge Functions](https://hono.dev/docs/getting-started/supabase-functions): Set up Hono with Supabase Edge Functions using Deno and the Supabase CLI. - [Vercel](https://hono.dev/docs/getting-started/vercel): Deploy a Hono application to Vercel with zero configuration using the Vercel CLI. - [WebAssembly (w/ WASI)](https://hono.dev/docs/getting-started/webassembly-wasi): Learn how WebAssembly and WASI enable sandboxed runtimes to access files, sockets, and system interfaces. ## Helpers - [Accepts Helper](https://hono.dev/docs/helpers/accepts): Handle Accept headers in requests by using the accepts helper to negotiate content, language, or encoding. - [Adapter Helper](https://hono.dev/docs/helpers/adapter): Use the Adapter helper to retrieve environment variables and runtime keys across different serverless platforms. - [ConnInfo Helper](https://hono.dev/docs/helpers/conninfo): Retrieve client connection information such as remote address using the ConnInfo helper and runtime adapters. - [Cookie Helper](https://hono.dev/docs/helpers/cookie): Manage regular and signed cookies by setting, getting, and deleting them with the Cookie helper. - [css Helper](https://hono.dev/docs/helpers/css): Write CSS in JSX template literals and get class names with a Style component. - [Dev Helper](https://hono.dev/docs/helpers/dev): Get the active router name and print registered routes to the console during development. - [Factory Helper](https://hono.dev/docs/helpers/factory): Create typed Hono apps, middleware, and handlers using factory functions with environment generics. - [html Helper](https://hono.dev/docs/helpers/html): Write HTML in tagged template literals and render unescaped strings using raw(). - [JWT Authentication Helper](https://hono.dev/docs/helpers/jwt): Encode, decode, sign, and verify JSON Web Tokens using the JWT helper functions. - [Proxy Helper](https://hono.dev/docs/helpers/proxy): Forward requests through a Hono app as a reverse proxy using a fetch wrapper. - [Route Helper](https://hono.dev/docs/helpers/route): Access matched routes, route path, and base path information inside handlers for debugging. - [SSG Helper](https://hono.dev/docs/helpers/ssg): Generate static files from your Hono application routes by running a build script. - [Streaming Helper](https://hono.dev/docs/helpers/streaming): Stream responses from Hono using stream, streamText, and streamSSE helper functions. - [Testing Helper](https://hono.dev/docs/helpers/testing): Test Hono applications with testClient, which returns a type-safe client for defined routes. - [WebSocket Helper](https://hono.dev/docs/helpers/websocket): Use upgradeWebSocket adapters for Cloudflare Workers, Deno, Bun, and Node.js server-side WebSockets. ## Guides - [Best Practices](https://hono.dev/docs/guides/best-practices): Follow Hono best practices by writing route handlers directly instead of Ruby on Rails-like controllers for better type inference. - [Create-hono](https://hono.dev/docs/guides/create-hono): Use create-hono command-line flags to select templates, skip prompts, and customize project initialization. - [Examples](https://hono.dev/docs/guides/examples): Find example Hono applications and code samples in the dedicated examples section. - [Frequently Asked Questions](https://hono.dev/docs/guides/faq): Get answers to frequently asked Hono questions, including third-party Renovate configuration setup. - [Helpers](https://hono.dev/docs/guides/helpers): Use helper functions like cookie utilities that assist application development without acting as middleware handlers. - [JSX](https://hono.dev/docs/guides/jsx): Configure TypeScript or Deno to write HTML using JSX syntax with hono/jsx for server and client rendering. - [Client Components](https://hono.dev/docs/guides/jsx-dom): Build interactive browser UI with hono/jsx/dom client components using a small React-like API. - [Middleware](https://hono.dev/docs/guides/middleware): Register middleware to run before or after handlers, awaiting next or returning responses to exit early. - [Migrating to v5](https://hono.dev/docs/guides/migrating-to-v5): Migrate Hono v4 applications to v5 by updating ESM imports and installing separate runtime adapter packages. - [Miscellaneous](https://hono.dev/docs/guides/others): Learn ways to contribute to Hono, sponsor authors, and find related repositories and package registries. - [RPC](https://hono.dev/docs/guides/rpc): Share API specifications between server and client so the Hono Client infers input and output types. - [Testing](https://hono.dev/docs/guides/testing): Test Hono applications by creating Request objects and validating Response objects with the app.request method. - [Validation](https://hono.dev/docs/guides/validation): Validate incoming request data with Hono's validator middleware and share API types using RPC. ## API - [Context](https://hono.dev/docs/api/context): Use the Context object to access requests, set response status and headers, and store request values. - [HTTPException](https://hono.dev/docs/api/exception): Throw custom HTTP exceptions with status codes, messages, or custom responses for error handling. - [App - Hono](https://hono.dev/docs/api/hono): Learn the main Hono object and its methods for routing, middleware, errors, and requests. - [API](https://hono.dev/docs/api/index): Learn Hono's API structure covering the Hono object, routing, Context, and middleware. - [Presets](https://hono.dev/docs/api/presets): Choose between Hono presets like hono, quick, and tiny to select the appropriate router for your use case. - [HonoRequest](https://hono.dev/docs/api/request): Explains how to read path parameters and query strings from HonoRequest. - [Routing](https://hono.dev/docs/api/routing): Covers defining routes, HTTP methods, wildcards, and path parameters in Hono. ## Concepts - [Benchmarks](https://hono.dev/docs/concepts/benchmarks): Shows benchmark results comparing Hono routers against other JavaScript routers. - [Developer Experience](https://hono.dev/docs/concepts/developer-experience): Describes Hono's TypeScript developer experience and type-safe application writing. - [Middleware](https://hono.dev/docs/concepts/middleware): Shows how middleware wraps handlers to process requests and responses in Hono. - [Philosophy](https://hono.dev/docs/concepts/motivation): Explains Hono's design philosophy, motivation, Web Standards, and ecosystem growth. - [Routers](https://hono.dev/docs/concepts/routers): Introduces Hono's five routers and when to use RegExpRouter or TrieRouter. - [Hono Stacks](https://hono.dev/docs/concepts/stacks): Explains building type-safe APIs and clients using Hono RPC and Zod. - [Web Standards](https://hono.dev/docs/concepts/web-standard): Lists Web Standards APIs Hono uses and the runtimes it supports. ## Agents - [Hono CLI](https://hono.dev/docs/agents/cli): Install and run the Hono CLI to inspect routes, send requests, benchmark, and generate static sites. - [Hono for Coding Agents](https://hono.dev/docs/agents/index): Guides coding agents to set up Hono projects and fetch Markdown documentation. ## Optional - [Hono - Web framework built on Web Standards](https://hono.dev/docs/index): Learn what Hono is, its features, runtimes, and quick start for building web apps.