Browser-native API mocking for frontend and QA teams
Mock Any API Response Without Waiting on Backend
Intercept fetch and XMLHttpRequest, return custom responses, and test success, failure, and latency paths in minutes.
✓ Rule-based matching ✓ Presets and imports ✓ Built for localhost and staging
Live Rule Preview
First matching rule wins, then returns your configured response.
GET /api/users
Status 200 • 120ms delay • mocked users payload
POST /api/login
Status 401 • error body for auth failure testing
Preset: Regression - Failure Paths
6 rules enabled • one-click scenario switching
Why teams need this
Frontend quality depends on API control. Without it, delivery slows and risky states go untested.
Backend dependency bottlenecks
Frontend work stalls when endpoints are unfinished, unstable, or inaccessible during development.
Error states are hard to test
401, 404, 500, rate limits, and malformed payload scenarios are often under-tested before release.
Slow, inconsistent test setup
Teams lose time rebuilding ad-hoc mocks and re-creating the same API conditions across teammates.
How Mock API Works
A simple workflow that gives you deterministic API behavior in your browser.
1
Create or import a rule
Define URL/method matching manually or paste cURL to prefill a rule instantly.
2
Set response behavior
Choose status code, response body, headers, and optional delay for the scenario you need to test.
3
Trigger requests in your app
Reload your page or user flow and watch matching requests resolve to your mocked response.
4
Switch scenarios with presets
Save rule-state combinations and flip between happy path, failure path, and loading path test runs.
Core Capabilities
Built to help teams test realistic API behavior fast, without adding backend complexity.
Intercept fetch + XMLHttpRequest
Covers modern and legacy request APIs in one browser-native workflow.
- ✓MAIN-world interception
- ✓No backend changes
- ✓Falls through when unmatched
Rule-based request matching
Match by method and URL using substring or regex patterns.
- ✓GET/POST/PUT/PATCH/DELETE/HEAD/OPTIONS/ANY
- ✓Regex mode
- ✓Rule ordering control
Custom mock responses
Control exactly what your app receives for each scenario.
- ✓Custom status code
- ✓Editable response body
- ✓Configurable response headers
Latency and failure simulation
Force loading states and resilience paths before production.
- ✓Response delay in ms
- ✓Error response simulation
- ✓Edge-case payload validation
Fast rule authoring
Create and refine rules without leaving the browser.
- ✓Inline editor with autosave
- ✓JSON formatting + validation
- ✓Duplicate and reorder rules
Import from cURL
Turn real network requests into mock rules quickly.
- ✓Parse URL, method, headers, and body
- ✓Pre-fill rule fields
- ✓Edit before import
Presets for scenario switching
Save and apply rule-state combinations for common test flows.
- ✓Named presets
- ✓Save/discard preset changes
- ✓Quick state switching
Local-first workflow
Run mocks locally with explicit controls and no backend coordination.
- ✓Global ON/OFF toggle
- ✓Per-rule toggles
- ✓Hit count visibility
Built for Real Team Workflows
Mock API helps engineering, QA, and product teams validate behavior before backend parity is ready.
Frontend Engineers
Build UI in parallel while backend is still evolving.
- ✓Ship screens without blocked API dependencies
- ✓Validate fallback UIs with controlled failure modes
- ✓Reduce time spent on temporary local stubs
QA Teams
Create repeatable API conditions for reliable regression testing.
- ✓Reproduce edge cases on demand
- ✓Standardize scenarios across teammates
- ✓Stress test retries, states, and validation flows
Product and Demo Owners
Present deterministic product flows without backend surprises.
- ✓Control response shape and speed live
- ✓Avoid demo breaks from unstable endpoints
- ✓Show realistic states with confidence
FAQ
Key questions teams ask before adopting Mock API.
Does Mock API require backend code changes?
No. It intercepts requests in the browser and returns mock responses based on your local rules.
Can I test error and latency scenarios?
Yes. You can set custom status codes and response delays per rule to simulate failures and slow network conditions.
Does it work with both fetch and XHR requests?
Yes. Mock API supports interception for both fetch and XMLHttpRequest in the page context.
Can I reuse and share rule sets?
Yes. Export/import JSON rules and use presets to switch between testing scenarios quickly.
How quickly can I create a rule?
Most users can define a basic rule in under a minute. cURL import can make this even faster for existing endpoints.
Is this suitable for localhost and staging?
Yes. The extension is designed for development and testing workflows including localhost, staging, and other non-production environments.
Stop waiting on backend to test frontend quality
Create deterministic API scenarios, validate critical states, and keep your team moving.