Nock
HTTP server mocking and expectations library for Node.js, intercepting http and https requests and matching them by method and URL to return preset responses, record replays and assert that expected calls were made.
Nock at github.com/nock/nock is a free MIT HTTP server mocking and expectations library for Node.js, npm nock 15.0.6 Node.js >= 22.20, intercepts http and https requests matched by method and URL to return preset responses with call assertions and replay recording, no sold commercial tier (data as of Nov 22, 2026).
*This is an affiliate link, we may earn a commission at no extra cost to you.
Is Nock free?
Nock: Nock is free open-source software released under the MIT License; the nock package latest 15.0.6 on npm requires Node.js >= 22.20. It intercepts outgoing Node http and https requests, matches them by HTTP method and URL against configured interceptors, and returns preset status codes, bodies and headers, with call-count assertions and optional recording for later replay. No paid commercial edition or per-seat license is sold by the project (data as of Nov 22, 2026). Check the official page for current status before relying on it.
Frequently Asked Questions
Is Nock free?
The code is free to self-host, but a hosted plan from the vendor may not be. Nock publishes its source, so cost depends on where you run it.
How much does Nock cost?
Nock is free open-source software released under the MIT License; the nock package latest 15.0.6 on npm requires Node.js >= 22.20. It intercepts outgoing Node http and https requests, matches them by HTTP method and URL against configured interceptors, and returns preset status codes, bodies and headers, with call-count assertions and optional recording for later replay. No paid commercial edition or per-seat license is sold by the project (data as of Nov 22, 2026). Usage volume, plan limits and add-ons can push the bill above the figures shown, so confirm the current numbers on the vendor page before committing.
Where can I check Nock's current pricing?
On Nock's official site, linked from this page. We only publish a price after reading the vendor's own pricing page, so if this page shows no number, it means no traceable public price is on file — not that the tool is free.
What is Nock?
Interceptors are scoped to a host and method, each describing a path, expected request body or headers and a reply fixture; when the Node HTTP layer emits a matching request, nock short-circuits it with the recorded response, and pending interceptors can be inspected or cleared to verify which calls the code actually made.
How does pricing work?
The package installs free under MIT with no seat license; it mocks outbound calls in-process, and commercial support would be outside the open-source project.
How does Nock compare with other tools in Dev Workflow & Productivity?
Nock is listed in the Dev Workflow & Productivity category, alongside 2 other tools we track here. 2 of those 2 peers have a dated price we read from the vendor's own pricing page, and the table below shows each tool's pricing model next to the exact rate on file — so the comparison is between published numbers, not between marketing pages.
| Tool | Pricing model | Key pricing on file | Price checked |
|---|---|---|---|
| Nock | Open source | Nock is free open-source software released under the MIT License; the nock package latest 15.0.6 on npm requires Node.js >= 22.20. It intercepts outgoing Node http and https requests, matches them by HTTP method and URL against configured interceptors, and returns preset status codes, bodies and headers, with call-count assertions and optional recording for later replay. No paid commercial edition or per-seat license is sold by the project (data as of Nov 22, 2026). | Nov 22, 2026 |
| Msw | Open source | Msw is free open-source software released under the MIT License; the msw package latest 3.0.7 on npm requires Node.js >= 22.12. It defines request handlers that match method, path and parameters to return mocked responses, intercepting real network calls through a Service Worker in the browser and through module interception in Node, so the same handlers drive development, tests and preview environments. No paid commercial edition or per-seat license is sold by the project (data as of Nov 22, 2026). | Nov 22, 2026 |
| Fetch Mock | Open source | Fetch-mock is free open-source software released under the MIT License; the fetch-mock package latest 12.6.0 on npm requires Node.js >= 18.11. It installs itself over the global or passed fetch implementation, matching requests by URL, method and request arguments to return preset status, body and headers, and records every call so tests can assert which fetches were made and with what parameters. No paid commercial edition or per-seat license is sold by the project (data as of Nov 22, 2026). | Nov 22, 2026 |
3 of these 3 entries carry a specific price we read from the vendor's site. Where the column says there is no dated price on file, we have not verified a rate — treat that as unknown rather than free, and check the vendor's page before you budget for it.
Full pricing breakdown
Nock's source code is publicly available, so you can run or build it yourself. The project may also sell a paid hosted or cloud plan — check the official site for current pricing.
Open source does not always mean every hosted version is free.
Key pricing: Nock is free open-source software released under the MIT License; the nock package latest 15.0.6 on npm requires Node.js >= 22.20. It intercepts outgoing Node http and https requests, matches them by HTTP method and URL against configured interceptors, and returns preset status codes, bodies and headers, with call-count assertions and optional recording for later replay. No paid commercial edition or per-seat license is sold by the project (data as of Nov 22, 2026).
Estimate your monthly bill with our calculator →Or build a full stack around your budget →Pricing Guides & Comparisons
Plan prices in these guides are read from each vendor's own pricing page, with the date we checked them.
⭐ Rate this tool
How would you rate this tool?
🚀 Never Miss a New AI Coding Tool
Join 1,000+ developers getting our weekly roundup: new AI tools, student free tiers, exclusive discounts, and side project deals. No spam, unsubscribe anytime.
Current Alternatives
Msw
API mocking layer that shares one set of request handlers between the browser and Node.js, intercepting network calls through Service Worker in the browser and module interception in Node to return mocked responses.
Fetch Mock
Mocking library for the browser and Node fetch API, matching fetch calls by URL, method and arguments to return preset responses, and recording calls for assertion in component and integration tests.
Tool Information
- Official Websitegithub.com
- CategoryDev Workflow & Productivity
- PricingOpen Source
- Price checkedNov 22, 2026
