
Fastify
Node.js web framework focused on low overhead, with JSON-schema validation and a plugin system.
90 open-source projects declare Fastify in their code; no maker's live product we track uses it yet. What makers like most: It is named as a mainstream TypeScript backend choice and a modern replacement for Express. On GitHub, 72 public pull requests moved projects to Fastify from tools we list, and 20 moved them away.
Profile checked
Works with AI agents:llms.txtCLIHow makers use Fastify
What Fastify is used for
Fastify vs the alternatives makers chose
| Option | Makers' products | Open source | |
|---|---|---|---|
| 66 34% | Yes | ||
| 31 16% | Yes | ||
| 30 15% | Yes | ||
| 26 13% | Yes | ||
| 21 11% | Yes | ||
| 5 3% | Yes | ||
| 0 0% | Yes |
For backend framework: how many of the 195 makers' products we know the backend framework of chose each option.
When to use Fastify, and when not
Pick Fastify if
- You want a Node.js API server with schema validation and good throughput. Backend Framework →
Something else fits better if
- You need a small TypeScript API, possibly on an edge runtime: Hono.
- Your backend needs Python for AI or data work: FastAPI.
- The backend is the product — many models, an admin, jobs and emails: Django or Ruby on Rails or Laravel.
- Your TypeScript API will grow many domains and you want enforced structure: NestJS.
Fastify 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.
More about Fastify
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.
How Fastify itself is built
1 tools, from its own code, website and Product Hunt page.
Fastify pros and cons
Themes that recur in makers' words and Hacker News comments, each linked to what it summarises.
What Hacker News says about Fastify
On Hacker News, 24% of comments about Fastify recommend it and 4% criticize it: net praise +20%, 3rd best liked of 10 tools HN discusses for backend framework.
By year
| Year | Comments choosing it, per month | Net praise |
|---|---|---|
| 2023 | 1.5 | +36% |
| 2024 | 0.8 | 0% |
| 2025 | 0.8 | +17% |
| 2026 (8 mo) | 0.4 | 0% |
In their words
- “I'd rather use an existing, battle-tested framework like Express or Fastify with a larger ecosystem.” HN, Sep 2025
- “Moved to fastify myself for my most recent project. Really like that it has OpenAPI integration” HN, Sep 2024
- “My company moved from fastify to fastify with typescript, then to nestjs. I've found them all to be inferior” HN, Jul 2024
Hacker News comments January 2023 to August 2026 that name Fastify in a sentence like "I use" or "we moved to", Claude read a sample of 57 and the counts scale it to all of them; net praise is comments recommending it minus comments criticizing it, as a share of all comments about it. How it's counted, and how HN compares with makers.
Reliability and open issues
The most wanted open issue on GitHub has 65 👍.
Most wanted on GitHub
- 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
More projects move to Fastify: 72 pull requests in, 20 out; the most come from Express and leave for Hono.
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
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
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.
Who uses it
No maker's live product on record yet, and 90 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.
None of these in makers' own words.
Open source: a project that declares Fastify as a dependency in its public code — verifiable, but not necessarily a live product.
What its projects tell coding agents
AGENTS.md and CLAUDE.md examples for Fastify: real files, what they cover, a starting file →
40 of the 59 open-source products built with Fastify that were worked on in the last 180 days keep instruction files for coding agents — 68%, against 53% of all the projects we read. AGENTS.md is in 35, CLAUDE.md in 22.
Alternatives to Fastify
All alternatives by situation →Questions makers ask about Fastify
What are the alternatives to Fastify?
For backend framework, the other options makers' products we track chose most are Laravel (66), Django (31), FastAPI (30), Ruby on Rails (26), NestJS (21), Hono (5). Open source or self-hostable among them: Laravel, Django, FastAPI, Ruby on Rails, NestJS, Hono. Each alternative, with the situation it fits, is on the Fastify alternatives page.
Do developers switch to or away from Fastify?
On GitHub, 72 public pull requests moved projects to Fastify from tools we list, most from Express (68), FastAPI (4); 20 moved them away, most to Hono (9), Express (7), NestJS (4).
When should you use Fastify?
You want a Node.js API server with schema validation and good throughput (backend framework). Something else fits better if: you need a small TypeScript API, possibly on an edge runtime, pick Hono; your backend needs Python for AI or data work, pick FastAPI.
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; 90 open-source projects declare it in their code. source ↗