# Mock Service Worker

API mocking library for JavaScript that intercepts requests in the browser and in Node.js and answers them with mocked responses.


Source: https://findsoftware.frbit.cloud/msw/
Last reviewed: 2026-11-16
Listed since: 2026-11-16

## Record

### Links

- home: https://mswjs.io
- repository: https://github.com/mswjs/msw
- docs: https://mswjs.io/docs/
- x: https://x.com/ApiMocking
- discord: https://discord.com/invite/z29WbnfDC5
- youtube: https://www.youtube.com/c/MockServiceWorker

### Identity

- status: active
- maintainer: Artem Zakharchenko
- maintainerType: individual
- parent: unknown
- firstRelease: 2018
- hqCountry: unknown

### Kind

- category: testing
- hosting: not applicable
- language: javascript
- runtime: node
- runtimeMin: not applicable
- basedOn: unknown

### Content

- contentStore: not applicable
- databases: not applicable
- adminUi: not applicable
- headlessApi: not applicable
- templating: not applicable
- i18n: not applicable

### Rendering and deploy

- runsAs: unknown
- renderingModes: not applicable
- installMethod: npm

### License

- licenseModel: open-source
- license: MIT

### Releases

- currentMajor: 3
- latestReleaseDate: 2026-11-15

### Adoption

- githubStargazers: 18351
- packagistDownloads: not applicable
- npmWeeklyDownloads: 33333070
- contributors: 172
- pluginCount: unknown
- packagistMonthlyDownloads: unknown
- ecosystemsMonthlyDownloads: unknown
- httpArchiveSites: unknown
- wordpressActiveInstalls: unknown
- dependentRepos: 11851
- dependentPackages: 2234

### Sources

- urls: https://mswjs.io (read 2026-11-16)
- urls: https://mswjs.io/docs/ (read 2026-11-16)
- urls: https://api.github.com/repos/mswjs/msw (read 2026-11-16)
- maintainer: https://github.com/mswjs/msw/blob/main/LICENSE.md (read 2026-11-16)
- maintainerType: https://github.com/mswjs/msw/blob/main/LICENSE.md (read 2026-11-16)
- language: https://api.github.com/repos/mswjs/msw (read 2026-11-16)
- category: https://mswjs.io (read 2026-11-16)
- runtime: https://mswjs.io (read 2026-11-16)
- firstRelease: https://registry.npmjs.org/msw (read 2026-11-16)
- currentMajor: https://api.github.com/repos/mswjs/msw/releases (read 2026-11-16)
- latestReleaseDate: https://api.github.com/repos/mswjs/msw/releases (read 2026-11-16)
- installMethod: https://mswjs.io/docs/quick-start (read 2026-11-16)
- license: https://github.com/mswjs/msw/blob/main/LICENSE.md (read 2026-11-16)
- licenseModel: https://github.com/mswjs/msw/blob/main/LICENSE.md (read 2026-11-16)
- npmWeeklyDownloads: https://api.npmjs.org/downloads/range/2026-11-01:2026-11-07/msw (read 2026-11-16)
- dependentPackages: https://packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/msw (read 2026-11-16)
- dependentRepos: https://packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/msw (read 2026-11-16)
- githubStargazers: https://api.github.com/repos/mswjs/msw (read 2026-11-16)
- contributors: https://api.github.com/repos/mswjs/msw/contributors?per_page=1 (read 2026-11-16)

## Notes

Mock Service Worker is an API mocking library for JavaScript that answers an application's requests with mocked responses while the application code stays unchanged. In the browser it uses the Service Worker API to intercept requests at the network level. In Node.js it intercepts requests at the socket level, and the same request handlers serve tests, local development and debugging in both environments.

Handlers use an Express-like routing syntax and can describe REST, GraphQL, Server-Sent Events and WebSocket traffic. The [documentation](https://mswjs.io/docs/) covers setup for each environment, and a [comparison page](https://mswjs.io/docs/comparison) sets it beside Nock, JSON Server, Mirage, Cypress and Playwright.

## Worth knowing

The FAQ says Node.js versions below a stated minimum are not supported.

---

Data licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Attributes are recorded, never scored; absent means unknown.
Credit, in full: FindSoftware, CC BY 4.0
