
Fastify
Node.js web framework focused on low overhead, with JSON-schema validation and a plugin system.
Works with AI agents:llms.txtCLIFastify is a web framework for Node.js for building HTTP APIs. It covers the same ground as Express — routes, request parsing, replies — but builds schemas, hooks and plugins into the core so that more of an API's structure is defined up front.
Two ideas carry most of the model. First, routes can declare JSON Schemas for the body, query string, params and response; Fastify compiles them with Ajv to validate input and with fast-json-stringify to serialize output. Second, everything is a plugin registered with register, and each plugin gets its own encapsulation context, so decorators, hooks and plugins added inside it are visible only to its children. Lifecycle hooks (such as onRequest and preHandler) replace Express-style middleware for cross-cutting work like auth checks.
For a small team, useful built-ins are structured JSON logging through pino (off until you enable it), TypeScript type definitions in the package, and type providers that derive request types from TypeBox or json-schema-to-ts schemas. It runs as a normal Node server; the docs recommend putting a reverse proxy in front in production and include adapters for AWS Lambda, Google Cloud Functions, Vercel and Netlify.
Fastify v5 runs only on Node.js 20 and later. Express middleware doesn't work out of the box — it needs the @fastify/express or @fastify/middie plugin — and the encapsulation model takes some learning. The docs also warn that schemas are compiled into code, so they must never come from user input.
Where it fits
How Fastify itself is built
1 tools, from its own code, website and Product Hunt page.
Who uses it
No maker's live product on record yet, and 75 open-source projects that declare it in their code.
We haven't found a maker's live product that uses Fastify yet — only the open-source projects below, which declare it in their code.
Open source: a project that declares Fastify as a dependency in its public code — verifiable, but not necessarily a live product.
Loved and watch-outs
Themes that recur in makers' words and Hacker News comments, each linked to what it summarises.
Reliability and open issues
- Fastify is excellent👍 65 · opened Mar 2021 · active Dec 2025
- QUIC implementation👍 20 · opened Jul 2020 · active Aug 2026
- eslint plugin for fastify?👍 17 · opened Nov 2022 · active Feb 2026
- Removal of declaration merging👍 12 · opened Sep 2023 · active Aug 2026
Who switches
Public pull requests on GitHub since Oct 2024 whose title says "X to Y" — real code changes moving a project from one tool to another, by developers in general. Open a row to see the pull requests.
Express → Fastify68 PRs
- feat(api): migrate HTTP layer from Express to Fastify 5Aman-Org/node-express-realworld-example-app · 2026-09-28
- docs: update architecture guide from Express to Fastifyopenhoat/rag-hub-mcp · 2026-09-12
- Feature/migrate express to fastify prismaResearchPulse/sjs-be · 2026-09-02
- Migrate MCP app from Express to Fastify and add MCP resources/promptslarrybwosi/scryme · 2026-08-28
- docs: add Express to Fastify migration guideNiema-121/fastify · 2026-08-25
- docs: add Express to Fastify migration guidefastify/fastify · 2026-08-20
- Revert "feat(nestjs): switch the HTTP adapter from Express to Fastify"rolling-scopes/rsschool-app · 2026-08-12
- feat(nestjs): switch the HTTP adapter from Express to Fastifyrolling-scopes/rsschool-app · 2026-08-12
- perf(server): migrate from Express to FastifyRushdiJa/LogForge · 2026-08-11
- docs: add Express to Fastify migration guidelawgems/newtest3 · 2026-08-05
FastAPI → Fastify4 PRs
- Migrate backend from Python FastAPI to Node.js FastifySOJIB-AHMMED/ticru.io · 2026-01-21
- Migrate backend from Python FastAPI to Node.js FastifySOJIB-AHMMED/ticru.io · 2026-01-21
- Migrate FastAPI backend to Fastify Node service and add debugging toolingMetaHub-AUS/Realm-of-Eternity · 2025-11-05
- Migrate FastAPI backend to Fastify Node service and add debugging toolingMetaHub-AUS/Realm-of-Eternity · 2025-11-05
NestJS → Fastify4+ PRs
- Revert "feat(nestjs): switch the HTTP adapter from Express to Fastify"rolling-scopes/rsschool-app · 2026-08-12
- feat(nestjs): switch the HTTP adapter from Express to Fastifyrolling-scopes/rsschool-app · 2026-08-12
- Migrate NestJS HTTP adapter to Fastify00joaopedro/NextStockOficial · 2026-07-15
- refactor: migrate NestJS from Express to Fastifysamir1498/green-algeria-map · 2026-06-11
Fastify → Hono9 PRs
- Migrate the API from Fastify on Render to Hono on Cloudflare Workerstrylinky/linky · 2026-09-16
- Migrate API from Fastify to Hono on Cloudflare Workersalexrr20/mooligan · 2026-07-25
- feat: Phase 1 — Fastify to Hono migration (all 14 route domains)Terrastories/terrastories-api · 2026-06-26
- Convert API server from Fastify to Honokevinclarkadstech/latest-greatest-starter · 2026-04-08
- feat: move from fastify to hono and enable bun supportmarkeejs/markee · 2026-03-22
- feat(backend): migrate from Fastify to Hono and reorganize architectureSellio-Squad/sellio_metrics · 2026-03-20
- Migrate HTTP stack from Fastify to Hono and add Fastify compatibility bridgePawleN-D/bloom-api · 2026-03-13
- refactor(typescript): migrate from Fastify to Honolizy-lab/backend-interview-assignments · 2026-02-26
- feat: migrate fastify to honoPoliNetworkOrg/backend · 2025-04-13
Fastify → Express7 PRs
- switch backend from fastify to expressChandrabhanu-Prusty/PeoplePay360-HR-Payroll · 2026-09-05
- Migrate API from Fastify to ExpressMoistbobo/vrc-world-dashboard-api · 2026-08-14
- docs: switch API gateway from Fastify to Express 5monirHRaju/TikFlow · 2026-05-12
- move from fastify to express for cli serverstripe/sync-engine-fork · 2025-11-12
- refactor: migrate from Fastify to Express for request handlingShejanMahamud/erazor-server · 2025-10-04
- fix: change fastify to expressoleksandr-antonenko/clickone-shop-backend · 2025-06-26
- feat: migrate from Fastify to Express and MongoDBwize-works/wize-content · 2025-04-26
Fastify → NestJS4+ PRs
- Proposal: migrate config-write service from Fastify to NestJSrackandhost/getmando · 2026-09-06
- Migrate from fastify to nestjsNexusSerg/shop-training-backend · 2026-05-20
- Migrate from fastify to nestjsNexusSerg/shop-training-backend · 2026-05-20
- refactor: migrate from Fastify to NestJS with Next.js frontendlucaskampi/video-chat-ai-backend · 2026-04-11
Alternatives to Fastify
All alternatives by situation →Questions makers ask about Fastify
Can I use my existing Express middleware with Fastify?
Not directly. Since v3, middleware needs a plugin such as @fastify/express or @fastify/middie, and it only sees the raw Node request and response; for Fastify-aware logic, the docs suggest using hooks like preHandler instead. source ↗
Does Fastify have TypeScript support?
Yes. Type definitions ship with Fastify (you add @types/node), and type providers infer request and reply types from your schemas. The team maintains providers for TypeBox and json-schema-to-ts, and a third-party one exists for Zod. The docs note that a few parts of the API may still be typed loosely. source ↗
Which Node.js versions does Fastify v5 support?
Fastify v5 supports Node.js 20 and later only, so older runtimes need to stay on v4. source ↗
Can I run Fastify on serverless platforms?
Yes. The docs cover AWS Lambda, Google Cloud Functions and Cloud Run, Firebase Functions, Netlify and Vercel, usually with a small wrapper. They note that larger apps boot more slowly and suggest platforms that serve many requests per instance, such as Cloud Run or Fargate, for the best results. source ↗
How long is each major version supported?
A major release is supported for at least six months after it ships, and gets security fixes for six more months after the next major version comes out. source ↗
Does Fastify include logging?
Yes, it uses pino for JSON logs. Logging is off by default; you turn it on when you create the instance (for example with logger: true), and you can set log levels per route. source ↗
How does request validation work?
You attach JSON Schemas to a route for the body, query string, params and headers, and Fastify compiles them into validation functions; body validation applies to JSON requests unless you set schemas per content type. Response schemas speed up JSON serialization and keep fields you did not list out of the reply. source ↗
Is Fastify free?
Yes — it is free, open-source software.
Is Fastify open source or self-hostable?
Open source, and you can self-host it. source ↗
Can AI coding agents work with Fastify?
It serves an llms.txt docs index; it has an official CLI (fastify-cli).
Who uses Fastify?
No maker's live product we track yet; 75 open-source projects declare it in their code. source ↗