Prompt
I’m building a setup to mock external APIs for development, what should I use?
Latest observation
Oct 6, 2026
OpenAI APIWeb search: off
If you’re building a setup to mock external APIs for development, the best choice depends on whether you want something code-based, record/replay, or service virtualization.
Good options by use case
1. WireMock
- Great for HTTP/REST APIs
- Supports request matching, stubbing, delays, faults, and response templating
- Works well locally, in Docker, and in CI
- Good default choice for many teams
2. Mockoon
- Very easy to set up
- GUI-driven, fast for local development
- Great if you want to create mock APIs without much code
- Best for lightweight dev mocks
3. MSW (Mock Service Worker)
- Best for frontend development
- Intercepts browser/network requests at the service worker level
- Lets you mock APIs without changing app code
- Excellent for React/Vue/Angular/web apps
4. Prism
- Useful if you have an OpenAPI spec
- Can generate mock responses from your API schema
- Good for contract-first development
5. Postman Mock Servers
- Convenient if your team already uses Postman
- Simple for sharing mock endpoints
- Fine for basic mocking, less ideal for complex behavior
6. LocalStack
- Best if you need to mock AWS services specifically
- Simulates many AWS APIs locally
- Useful for cloud-heavy development
My recommendation
- For backend/API development: start with WireMock
- For frontend development: use MSW
- For quick local no-code mocks: use Mockoon
- If you have OpenAPI specs: use Prism
If you want a practical setup
A common stack is:
- WireMock for stable backend integration mocks
- MSW for frontend/browser-specific API mocking
- Docker Compose to run mocks locally and in CI
If you tell me:
- your language/framework,
- whether this is for frontend, backend, or both,
- and whether your APIs are REST, GraphQL, or gRPC,
I can recommend the best tool and a starter setup.