MockWebServer
MockWebServer: A focused open-source choice for scripted local HTTP client tests. Ranked #23 of 26 in API Mocking Tools by our editors (6.7/10); pricing: Open source; best for local HTTP tests needing scripted responses.
At a glance
- Editor score6.7 / 10
- PricingOpen source
- Best forLocal HTTP tests needing scripted responses
- Paid fromFree
- Dynamic responsesYes
- Facts checked21 Sep 2026

Where it wins
- Scripts response status codes, headers, bodies, and throttling
- Records and verifies request methods, paths, headers, and bodies
- Supports HTTP, HTTPS, and HTTP/2 client testing
Where it doesn't
- Primarily targets internal and basic OkHttp testing
- Request matching is centered on paths and request data
- Not actively developed for new features
Our verdict on MockWebServer
MockWebServer is an open-source testing library distributed with OkHttp. It runs a local HTTP or HTTPS server that returns scripted responses, records incoming requests, and supports verification of request methods, paths, headers, bodies, and HTTP versions. Developers can use it for local application tests that need controlled network behavior, particularly when testing HTTP clients built with OkHttp. Its scope is intentionally focused rather than that of a broad HTTP testing platform.
Its strongest area is response and request control. Scripts can define custom status codes, headers, and bodies, while custom dispatchers can select responses based on request paths or other request data. Request recording and verification help check what a client sends, and response throttling supports slow-network test scenarios. HTTP/2 client testing adds protocol coverage alongside HTTP and HTTPS, making the library useful for tests that need local protocol behavior without relying on an external server.
The trade-off is scope and product direction. MockWebServer is described as primarily an internal-testing and basic OkHttp-testing library, so teams looking for a wider platform should consider whether its focused local-server model matches their needs. Its documented request matching centers on paths and request data, and its listed protocol coverage is HTTP, HTTPS, and HTTP/2. The vendor also says it is not actively developed for new features. Choose it for straightforward, scriptable local HTTP client tests; look elsewhere when you need a broader HTTP testing platform or a product with ongoing new-feature development.
Your product? Our editors can test MockWebServer in depth and publish a review, labelled as paid · from $149/mo →
MockWebServer pricing
MockWebServer fact sheet
| Free plan | Not verified |
|---|---|
| Paid from | Free |
| Dynamic responses | Yes |
| OpenAPI import | Not verified |
| Request matching | Path |
| Mock data generation | Not verified |
| Local deployment | Yes |
| Supported protocols | HTTP, HTTPS, HTTP/2 |
| Deployment | Self-hosted |
| Support | Docs |
| Built for | Solo, Small business, Mid-market, Enterprise (editorial estimate) |
| Pricing | Open source |
| Website | square.github.io |
| Facts checked | 21 Sep 2026 |
Alternatives to MockWebServer
- BeeceptorA broad API mocking platform with protocol coverage, contract testing, and hosted or self-hosted deployment.9.4
- MockServerA free, open-source choice for teams that need broad, self-hosted API control.9.1
- WireMockA flexible mocking platform spanning hosted, local, CI/CD, Kubernetes, and self-managed use.9.0
See all MockWebServer alternatives →
Used MockWebServer? Be the first to review it
The editor score above is our own research. What this page doesn't have yet is a reader's view — what you used MockWebServer for, what worked and what didn't. No stars are seeded and no review is paid for; an editor reads every one before it appears.
Write a reviewTwo minutes · verified accounts only · read by an editor before it appears
Featured on iTechGuides
MockWebServer is listed in our API Mocking Tools directory. Add the badge to your site — it links back to this page.
<a href="https://www.itechguides.com/products/mockwebserver/"><img src="https://www.itechguides.com/best/badge/mockwebserver.svg" alt="Featured on iTechGuides" width="230" height="46"></a>
Reviewed by iTechGuides Editors · Editorial team · Updated Oct 2026
Advertiser disclosure: iTechGuides is reader-supported. Vendors can pay for top positions in our rankings and for a place on other products' pages, and we may earn a commission when you click some links. Bought places stand at the number bought; this page and our disclosure say so. Paying vendors may get a fuller, more detailed review from our editors, and that review can change their score. How we rank.
Last updated · How we research and update


