Updated

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.

Open sourceSelf-hostableFree tier

Profile checked

Works with AI agents:llms.txtCLI
Ask your AI about this, with this page as the source:ChatGPT ↗Claude ↗Perplexity ↗

How makers use Fastify

What Fastify is used for

Backend Framework · Minimal router →Node.js APIs that want low overhead, JSON-schema request validation and a structured plugin system.Trade-off: Its own plugin and encapsulation model to learn; you still choose the database and auth yourself.
Laravel66Django31FastAPI30Ruby on Rails26NestJS21Fastify0Makers' products on each, for backend framework

Fastify vs the alternatives makers chose

OptionMakers' productsOpen source
Laravel66 34%Yes
Django31 16%Yes
FastAPI30 15%Yes
Ruby on Rails26 13%Yes
NestJS21 11%Yes
Hono5 3%Yes
Fastify0 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

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.
From each decision's guide, written from what makers' products chose and why.

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.

Pros

  • It is named as a mainstream TypeScript backend choice and a modern replacement for Express. HNHN 2
  • Solo developers and two-person teams pair it with Postgres and Redis to ship small API backends quickly. HNHN 2HN 3HN 4
  • Teams run it as the HTTP layer under NestJS. HNHN 2

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

YearComments choosing it, per monthNet praise
20231.5+36%
20240.80%
20250.8+17%
2026 (8 mo)0.40%

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

Open on 2026-10-04 in fastify/fastify, with activity in the last year — issues and feature requests by 👍.

Who switches

More projects move to Fastify: 72 pull requests in, 20 out; the most come from Express and leave for Hono.

Moving to FastifyMoving away
Fastify
Express → Fastify68 PRs
FastAPI → Fastify4 PRs
Fastify → Hono9 PRs
Fastify → Express7 PRs
Fastify → NestJS4+ PRs

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.

nao
nao👾 nao is an open source analytics agent. (1) Create context with nao-core cli, (2) depl…Backend FrameworkIn its code · source ↗
Nx
NxMonorepo build system that runs and caches tasks across projects, understands their depe…Backend FrameworkIn its code · source ↗

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.

936words in the median file
pnpmthe package manager most named, in 15 of 38 files
61%say how to test a change
Named more in these files than in other projects' — in how many of the 38:
What AGENTS.md files say about other tools →What open-source products tell their coding agents →

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 ↗