/Knowledge/sources/honojs__hono/llms-full/routers-smartrouter--637969b48cd4.md
Routers: SmartRouter - hono-docs
Routers: SmartRouter Source evidence: /Sources/honojs hono/provenance.md Canonical citation: https://hono.dev/llms full.txt smartrouter Summary SmartRouter i...
Routers: SmartRouter
Source evidence: /Sources/honojs__hono/provenance.md Canonical citation: https://hono.dev/llms-full.txt#smartrouter
Summary
SmartRouter is useful when you're using multiple routers. It selects the best router by inferring from the registered routers. Hono uses SmartRouter, RegExpRouter, and TrieRouter by default: ```ts // Inside the core of Hono. readonly...
Content
SmartRouter is useful when you're using multiple routers. It selects the best router by inferring from the registered routers. Hono uses SmartRouter, RegExpRouter, and TrieRouter by default:
// Inside the core of Hono.
readonly defaultRouter: Router = new SmartRouter({
routers: [new RegExpRouter(), new TrieRouter()],
})
When the application starts, SmartRouter detects the fastest router based on routing and continues to use it.
Metadata
{
"chunk_index": 0,
"citation": "https://hono.dev/llms-full.txt#smartrouter",
"coverage_role": "overview",
"qualified_title": "Hono / llms-full / Routers > SmartRouter",
"retrieved_at": "2026-07-02T05:51:01Z",
"section_index": 545,
"source_id": "/honojs/hono",
"source_type": "llms_full",
"target_label": "llms-full",
"title": "Routers: SmartRouter",
"upstream_url": "https://hono.dev/llms-full.txt",
"version": "2026"
}