# Moq - Mock API Requests

> Mock HTTP requests with custom responses, status codes, delays, and headers. Perfect for development, testing, and debugging.

Canonical page: [https://chrome-stats.com/d/moq-mock-api-requests](https://chrome-stats.com/d/moq-mock-api-requests)

## Overview

- **ID:** `moq-mock-api-requests`
- **Platform:** Firefox
- **Type:** Firefox add-on
- **Status:** Available
- **Publisher:** Pavel Shpakovich
- **Category:** web-development
- **Daily users:** 13
- **Version:** 2.15.7
- **Last updated:** 2026-06-29
- **First published:** 2026-02-28
- **Size:** 393 KB
- **Data as of:** 2026-09-08
- **Store listing:** [Firefox Add-ons Store](https://addons.mozilla.org/firefox/addon/moq-mock-api-requests/)
- **Website:** [https://github.com/PavelShpakovich/mock-ext](https://github.com/PavelShpakovich/mock-ext)
- **Privacy policy:** [https://addons.mozilla.org/firefox/addon/moq-mock-api-requests/privacy/](https://addons.mozilla.org/firefox/addon/moq-mock-api-requests/privacy/)

## Description

Moq - Powerful API Mocking for Chrome DevTools

Moq is a developer tool that intercepts and mocks HTTP requests directly in your browser, eliminating the need to modify backend code or wait for API changes during frontend development.

WHY INSTALL MOQ?

✓ Speed Up Development - Test different API responses instantly without backend changes or server restarts
✓ Isolated Testing - Work offline or test edge cases (errors, timeouts, specific data) that are hard to reproduce
✓ No Code Changes - Mock requests at the browser level without touching your application code
✓ Real Time Control - Enable/disable mocks on-the-fly, perfect for comparing real vs mocked responses

KEY FEATURES

→ Client-Side Interception
Captures fetch() and XMLHttpRequest before they reach the network

→ Full Response Control
Set custom status codes (200, 404, 500), response bodies, headers, and delays

→ Proxy Rules
Route matching requests through a custom proxy target instead of returning a mock response
  • Redirect requests to any base URL (e.g. staging, local server)
  • Optional path rewrite with from/to pattern (plain string or regex)
  • Attach JavaScript response hooks to transform proxied responses
  • Conflict detection warns when a proxy rule overlaps with a mock rule
  • Hit counters track how many times each proxy rule is triggered
  • Import/Export proxy rules independently from mock rules

→ Response Hooks with JavaScript
Write code to transform responses dynamically (both mock and real)
  • Toggle hooks on/off without deleting code
  • Comprehensive validation catches undefined variables and syntax errors
  • Available globals: response, request, helpers (uuid, timestamp, random data)

→ Two Response Modes
  • Mock Mode - Return configured mock response with your custom data
  • Passthrough Mode - Forward request to real server and transform response with JavaScript hook

→ Dynamic Variables
Generate unique data with {{timestamp}}, {{uuid}}, {{random_number}}, {{random_string}} in responses

→ Request Recording &amp; Logging
Record and inspect actual network traffic, create mocks from real responses with one click

→ Smart Organization
Group rules into folders, search and filter, bulk enable/disable, hit counters show usage
  • Compact and detailed view modes for both Rules and Proxy tabs

→ Rule Validation &amp; Warnings
Automatic detection of invalid regex, JSON errors, overlapping rules, and unused rules

→ Import/Export with Preview
Share rule configurations with merge or replace modes, validate before importing

→ Multi-Monitor Support
Open in standalone window or DevTools panel, full state synchronization

→ Dark/Light Theme
System preference detection with manual override

→ CORS Auto-Fix
Automatically inject CORS headers to bypass cross-origin restrictions

→ Multi-Language
Full English and Russian translations

USE CASES &amp; BENEFITS

FOR FRONTEND DEVELOPERS:
• Test different API responses without backend changes
• Redirect API calls to a local or staging server with Proxy Rules
• Work offline or before backend APIs are ready
• Validate error handling with custom error responses
• Test loading states with configurable delays

FOR QA ENGINEERS:
• Simulate edge cases that are hard to reproduce
• Test timeout scenarios and network failures
• Validate UI with specific data combinations
• Automate testing with exported rule configurations

FOR DEBUGGING:
• Modify production API responses locally for troubleshooting
• Proxy requests to a different environment without changing application code
• Compare real vs mocked responses side-by-side
• Track request/response patterns with hit counters
• Organize test scenarios into folders for different features

PRIVACY &amp; SECURITY

✓ No data collection
✓ No external servers
✓ All data stored locally in your browser
✓ Open source and transparent

GETTING STARTED
<ol><li>Open Chrome DevTools (F12)</li><li>Click the "Moq" tab</li><li>Create your first mock rule with URL pattern matching</li><li>Enable recording to capture real requests</li><li>Click "Mock This" on any logged request to create a rule instantly</li><li>Use Proxy Rules to redirect requests to a different server without changing your code</li></ol>
Perfect for frontend developers, QA engineers, and anyone who needs to test API integrations without modifying backend code or waiting for server changes. All data stays local - no external servers, no data collection, complete privacy.

## Rankings

- #29,063 — Overall
- #15 — mock
- #31 — request
- #131 — response
- #219 — debug

## Permissions and access

### Permissions

- `storage`
- `activeTab`
- `tabs`
- `contextMenus`
- `declarativeNetRequest`

### Host permissions

- `<all_urls>`

### Content script matches

- `<all_urls>`

## Safety

- **Risk impact:** High risk impact
- **Risk likelihood:** High risk likelihood

### Analysis details

- Grants access to browser tabs, which can be used to track user browsing habits and history, presenting a privacy concern.
- This extension has low user count. Unpopular extensions may not be stable or safe.

> Some risk analysis details are omitted from this free response. [Upgrade to view the full analysis](https://chrome-stats.com/pricing).

## Similar extensions and apps

- [Mock Express](https://chrome-stats.com/d/mock-express) — 57 users
- [ModResponse Mock replay API](https://chrome-stats.com/d/modresponse-mock-replay-api) — 33 users
- [tweak: mock and modify HTTP requests](https://chrome-stats.com/d/tweak-extension) — 1,517 users, 4.14 / 5
- [Interceptor](https://chrome-stats.com/d/xhr-interceptor) — 129 users, 3.40 / 5
- [API Mock Generator](https://chrome-stats.com/d/api-mock-generator) — 1 users
- [API Response Mocker](https://chrome-stats.com/d/api-response-mocker)
- [Mocklet](https://chrome-stats.com/d/mocklet) — 4 users
- [Requestman](https://chrome-stats.com/d/requestman) — 1 users
- [Parrot API mocking Pro](https://chrome-stats.com/d/parrot-api-mocking-pro) — 2 users
- [APIlot](https://chrome-stats.com/d/apilot)
- [API MOCK](https://chrome-stats.com/d/api-mock)
- [Apifox Browser Extension](https://chrome-stats.com/d/apifox-browser-extension) — 23 users

---

Source: [Chrome-Stats](https://chrome-stats.com/d/moq-mock-api-requests)
