# Mock Service Worker alternatives

The closest alternatives to Mock Service Worker are Mirage JS, Nock and Mockttp. Stay with Mock Service Worker when: Frontend tests and demos that need realistic API responses.

## Mirage JS

Choose it over Mock Service Worker when: Choose it when your frontend mock needs an in-memory database with records and relationships.

Mirage JS defines mock routes and lets handlers access an in-memory database backed by models. Its guide shows how to declare relationships and seed records for development, and describes how its test environment loads the routes without applying those seeds ([overview](https://miragejs.com/docs/getting-started/overview/)).

- Official site: https://miragejs.com/
- Source: https://miragejs.com/docs/getting-started/overview/
- Checked: 29 November 2026

## Nock

Choose it over Mock Service Worker when: Choose it when Node.js tests need to assert that specific outbound HTTP calls occurred.

Nock intercepts HTTP requests in Node.js and lets tests set expectations for matching calls. Check an individual scope with `scope.isDone()` to see whether its expected requests occurred, or inspect pending mocks to find calls the test never made ([repository documentation](https://github.com/nock/nock)). The licence is MIT ([repository licence](https://api.github.com/repos/nock/nock/license)).

- Licence: MIT
- Official site: https://github.com/nock/nock
- Source: https://github.com/nock/nock
- Checked: 29 November 2026

## Mockttp

Choose it over Mock Service Worker when: Choose it when a JavaScript test needs a local HTTP server and wants to inspect requests it receives.

Mockttp starts a local mock HTTP server and lets JavaScript tests register method and path rules. Its examples use `.thenReply()` to return a response and `getSeenRequests()` to retrieve requests received by a configured endpoint ([repository documentation](https://github.com/httptoolkit/mockttp)). The licence is Apache-2.0 ([repository licence](https://api.github.com/repos/httptoolkit/mockttp/license)).

- Licence: Apache-2.0
- Official site: https://github.com/httptoolkit/mockttp
- Source: https://github.com/httptoolkit/mockttp
- Checked: 29 November 2026

## WireMock

Choose it over Mock Service Worker when: Choose it when callers need a separate HTTP stub server configured with JSON mappings.

WireMock can return configured responses when requests match stub mappings. Its stubbing guide shows how to register a mapping using JSON and set the response status, body and headers. It also documents priorities for cases where multiple stubs match a request ([stubbing](https://wiremock.org/docs/stubbing/)).

- Official site: https://wiremock.org/
- Source: https://wiremock.org/docs/stubbing/
- Checked: 29 November 2026

- [Mock Service Worker](https://www.devcurator.com/tools/msw.md)
