- Introduction
- Installation
- Interface Overview
- Basic Usage
- URL Patterns
- Override Body
- Redirect URL
- Managing Rules
- Additional Features
- Important Notes
- FAQ
Network Overrides DevTools is a Chrome/Edge extension for developers that intercepts and overrides API response data directly in the browser, without modifying backend code.
🛒 Chrome Web Store: Network Overrides API (DevTools)
Common use cases:
- Mock API responses to test the frontend when the backend isn't ready.
- Inject or override Request Headers (e.g.
Authorization: Bearer token). - Debug by altering responses to simulate different states (errors, empty data, edge cases, etc.).
- Redirect requests from an old API to a new one without changing frontend code.
- 1-click Duplicate Rules and manage Rule Profiles / Presets per domain.
- Real-time Image and SVG visual preview inside the modal editor.
- Quickly inspect captured API requests and copy them as cURL commands.
- Chrome or Microsoft Edge (latest version).
- Install from Chrome Web Store or load as unpacked from source.
- Open
chrome://extensions(oredge://extensions). - Enable Developer mode (top right).
- Click Load unpacked.
- Select the project root directory (the folder containing
manifest.json). - The "Network Overrides API (DevTools)" extension will appear.
- The extension icon appears on the toolbar.
- Open DevTools (F12) → Overrides tab.
The extension has 2 entry points:
Click the extension icon on the toolbar. Contains:
- Header: "Network Overrides API"
- Refresh button (↻): Reload the captured API list.
- Enable Overrides toggle: Turn override functionality on/off.
- 3 tabs:
- Captured APIs (N): List of captured requests, grouped by resource type (XHR, Fetch, JS, CSS, etc.).
- Overridden (N): APIs currently matched by an active rule.
- Rules (N): List of all saved override rules.
- Search bar: Filter APIs by URL substring.
Open DevTools (F12) → Overrides tab. Same as popup, plus:
- Manual editor: A quick-add form (pattern + body) above the Rules tab.
- HAR auto-load: Automatically loads request history from
chrome.devtools.network.getHAR()on panel open.
Click an API to open the modal with:
- Pattern: URL pattern for matching.
- HTTP Method: Dropdown (
Any,GET,POST,PUT,PATCH,DELETE) to scope the rule to a specific request method. Defaults toAny, which matches every method (same as before this field existed). Pre-filled from the captured request's method when opening the modal from a captured API. - Override body / Redirect to URL: Choose the override type.
- Response body: Custom response content (for body override).
- Redirect URL: Target URL (for redirect).
- Format JSON: Pretty-print JSON body.
- Body type badge: Auto-detects
textorjson. - Save Override: Save the rule.
- Option A: Click the extension icon on the toolbar → popup opens.
- Option B: Open DevTools (F12) → Overrides tab.
Flip the Enable Overrides toggle ON.
The extension will attach the debugger to the current tab and start monitoring network requests.
Browse your application normally. API requests will appear automatically in the Captured APIs tab.
Method 1 (Click API):
- Go to Captured APIs or Overridden tab.
- Click an API you want to override.
- The modal opens with the pattern pre-filled, and the Method dropdown pre-selected to the captured request's method if it's one of
GET/POST/PUT/PATCH/DELETE(otherwise it defaults toAny). - If the API has a stored response body, it will be auto-filled into the Response body field.
- Edit the content → Save Override.
Method 2 (Manual — DevTools panel only):
- Go to the Rules tab.
- In the form above, enter a Pattern and Response body.
- Click Add override.
- Overridden APIs show a blue border in the list (
activeclass). - The Overridden tab shows the count and list of matched APIs.
- The real response is replaced with your custom content.
- Toggle the switch OFF to disable all overrides.
- Or go to Rules tab → click ✕ to delete a specific rule.
Any URL containing the pattern string is a match.
Pattern: /api/users
Matches: https://example.com/api/users
https://example.com/api/users/123
https://example.com/v2/api/users/list
No match: https://example.com/api/admin
Use * to match any URL segment. Each * also captures the matched value for use in Redirect URLs.
Pattern: /api/*/users/*
Matches: /api/v1/users/123 → captures: ["v1", "123"]
/api/v2/users/abc → captures: ["v2", "abc"]
Multiple * wildcards are supported, each corresponding to one capturing group.
Patterns starting and ending with / are treated as regex. Optional flags follow the closing /.
Pattern: /\/api\/v\d+\/users/i
Matches: /api/v1/users (case-insensitive)
/API/V2/Users
No match: /api/admin/users
Pattern: /\/api\/user\/(\d+)/
Matches: /api/user/42 (captures: ["42"])
Pattern: *
Pattern: all
Matches every request.
Rules are evaluated in list order. The first matching rule wins. Drag-and-drop reordering is not supported — to change priority, delete and recreate rules in the desired order.
Besides the URL pattern, a rule can also be scoped to a specific HTTP method via the Method field in the override modal (see 3.3 and 4). A rule with a specific method (GET, POST, PUT, PATCH, DELETE) only applies to requests using that method; Any (the default) matches every method, regardless of pattern type.
Content is base64-encoded and returned as the response body.
// Example: Mock JSON response
{
"status": "ok",
"data": [
{ "id": 1, "name": "Alice" },
{ "id": 2, "name": "Bob" }
]
}Use when you already have base64-encoded content (e.g., binary data, images, pre-encoded files).
text: Content is not valid JSON (blue badge).json: Content is valid JSON (green badge). Auto-detected as you type.
Click Format JSON to pretty-print the response body. If the content is not valid JSON, the button has no effect.
When creating a new override from an API:
- If the API has a stored response body (in
recentApiBodies), it is pre-filled automatically. - Otherwise, the extension sends a
getApiDatamessage to the background worker to retrieve the stored body. - This feature only works when Auto-fill on open is enabled (default: on).
When you select Redirect to URL, instead of overriding the response body, the extension redirects the request at the request stage (before the actual request is sent).
Use * in the Redirect URL to substitute captured values from the pattern match.
Examples:
| Pattern | Request URL | Captures | Redirect URL | Result |
|---|---|---|---|---|
/api/* |
https://site.com/api/user |
["user"] |
https://site.com/api/v2/* |
https://site.com/api/v2/user |
/api/old/*/data |
/api/old/v1/data |
["v1"] |
/api/new/*/data |
/api/new/v1/data |
https://old.com/*/item/* |
https://old.com/shop/item/5 |
["shop", "5"] |
https://new.com/*/product/* |
https://new.com/shop/product/5 |
If any * remains unsubstituted in the Redirect URL, the extension logs an error and lets the request proceed normally (no redirect).
Common mistake: Pattern has 1 * but Redirect URL has 2 *:
| Pattern | Request URL | Captures | Redirect URL | Result |
|---|---|---|---|---|
https://site.com/api/* |
https://site.com/api/user |
["user"] |
https://site.com/api/v2/** |
❌ Error: second * not substituted |
- Redirect from an old API to a new API without changing frontend code.
- Point requests from production to a staging/local server for debugging.
- Suppress certain requests by redirecting to an empty endpoint.
Go to the Rules tab. Each rule displays:
- Enabled checkbox: at the start of the row. Unchecked means the rule is disabled (see 8.5).
- Pattern: Bold blue text.
- Method badge (if set to something other than
Any): a small badge (e.g.POST) next to the body preview. - Redirect URL (if set): Arrow → followed by the URL.
- Body preview: First 80 characters + mode label (
text/file).
Click ✎ next to a rule → modal opens with current values → edit → Save Override.
Click ✕ → rule is removed immediately.
- Rules are stored in
chrome.storage.local→ they never disappear on page refresh, DevTools close, or browser restart. - No need to worry about losing your configuration.
Each rule has a checkbox at the start of its row. Unchecking it disables the rule (enabled: false) without deleting it:
- The rule stays visible in the Rules list, dimmed.
- Any API it targets stays in the Overridden tab (it still "would apply" by pattern and method) but is also shown dimmed, since a disabled rule is no longer actively applied.
- The background service worker skips disabled rules when deciding which override to apply to a request.
Checking the box re-enables the rule. New rules, and rules that existed before this feature was added, default to enabled.
Click Export in the Rules tab to download the rules for the currently active domain as a JSON file (named after the domain). The file has this shape:
{
"version": 1,
"domain": "https://example.com",
"exportedAt": "2026-07-07T00:00:00.000Z",
"overrides": [
/* OverrideRule[] */
]
}Export only includes rules for the domain currently open in the panel, not all domains.
Click Import in the Rules tab and pick a previously exported (or hand-crafted) JSON file:
- If the file's
domainfield is present and doesn't match the domain currently active in the panel, a confirm dialog warns you and asks whether to import into the current domain anyway. Canceling aborts the import with no changes. - If the current domain already has rules, a confirm dialog asks how to combine them: OK merges — the imported rules are appended to the end of the existing list; Cancel replaces — all existing rules for the current domain are overwritten by the imported ones.
- If the current domain has no rules yet, the import is applied directly with no prompt.
- Invalid files (not valid JSON, missing the
overridesarray, or a rule missing required fields) are rejected with an alert, and nothing is changed. - Only known rule fields (
pattern,mode,body,redirectUrl,method,enabled) are kept from each imported rule; any other properties in the file are dropped.
Like Export, Import always operates on the domain currently active in the panel — never all domains at once.
Each API entry has a cURL button. Click to copy the request as a cURL command:
curl 'https://api.example.com/data' \
-X 'POST' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer xxx' \
--data-raw '{"key":"value"}'Search box in the Captured APIs and Overridden tabs. Searches by URL substring (case-insensitive). Matching text is highlighted with a yellow background.
Click the Refresh button (↻) in the top right. The extension retries up to 5 times (each 250ms apart) to load APIs from the background worker.
APIs are grouped by resource type:
| Type | Label |
|---|---|
| XHR | XHR |
| Fetch | Fetch |
| JS | JS |
| CSS | CSS |
| Image | Img |
| Media | Media |
| Font | Font |
| Document | Doc |
Insert dynamic placeholders into mock response bodies:
{{$uuid}}: Generates a random UUID v4 (e.g.c9bf9e57-1685-4c89-bafb-ff5af830be8a).{{$isoDate}}: Current ISO 8601 timestamp (2026-08-09T10:30:00.000Z).{{$epoch}}: Current Unix epoch timestamp in milliseconds.{{$randomEmail}}: Generates a random test email (user_x82a9@example.com).{{$randomName}}: Generates a random full name (Alex Rivers).{{$randomInt(min, max)}}: Generates a random integer betweenminandmax.{{$query(paramName)}}: Extracts the query parameterparamNamedirectly from the request URL.
Check Global Rule when creating or editing a rule to apply it across all domains. Global rules display a prominent GLOBAL badge in the rules list.
Override outgoing POST, PUT, or PATCH request payloads before they reach the server by filling in the Request Payload field in the editor modal.
Use the Network selector to simulate Fast 3G, Slow 3G, or Offline conditions for the attached tab. The toolbar also shows live overridden and failed request counters, and restores them after a service-worker restart.
Import .har files (HTTP Archive exported from DevTools Network tab) to automatically convert recorded network requests into mock rules.
In the Override Modal editor:
Ctrl + Enter(orCmd + Enteron macOS): Save override rule.Ctrl + Shift + F(orCmd + Shift + Fon macOS): Format JSON response body. | WebSocket | WS | | Manifest | Manifest | | EventSource | EventSource | | TextTrack | TextTrack | | Other | Other |
Click a group header (e.g. "XHR ▼") to collapse/expand. Collapse state is persisted in storage.
When a request is overridden, the extension adds these response headers:
x-network-overrides: truex-network-overrides-pattern: <pattern>
This lets you easily identify overridden requests in the DevTools Network tab.
- Overrides only apply to the currently attached tab.
- Each time you toggle ON, the extension attaches to the active tab.
- Switching to another tab disables overrides for the new tab until you toggle again.
- Maximum 500 URLs in the recent APIs list.
- Maximum 100 response bodies stored.
- When exceeded, the oldest entries are evicted (FIFO).
- Only XHR and Fetch resource types have their response bodies stored (for auto-fill).
- Other types (JS, CSS, Image, etc.) are not stored.
Recent APIs and response bodies are keyed by recentApis_{tabId} and recentApiBodies_{tabId}. When you close a tab and reopen it, the new tabId differs → old data is not shown.
This extension is designed for developer debugging only. Do not use it in end-user production environments.
The extension requires:
debugger— to intercept network requests.storage— to persist rules and data.<all_urls>— to attach the debugger to any tab.
Checklist:
- Is Enable Overrides turned ON? (Toggle should be blue.)
- Does the pattern match the URL? Try
*to match everything. - Is the current tab the one being debugged? (Try refreshing the extension.)
- Open DevTools → extension's Console to check for errors.
Try refreshing the page. If the issue persists, disable and re-enable the extension.
Go to the Rules tab and click ✕ on each rule. There is no "Clear all" button.
Override rules are permanent and survive restarts. Recent APIs, however, are linked to tabId. If you see old data, you might be on the same tab you used before. Closing and reopening the tab assigns a new tabId, so old data won't appear.
Go to chrome://extensions → click Details on the extension → enable Allow in incognito.
Check the DevTools Network tab:
- Response header
x-network-overrides: trueis added. - In the extension, the API entry is highlighted in blue and appears in the Overridden tab.
Click the Refresh button (↻). The extension retries 5 times over 1.25 seconds. If still empty:
- Verify the toggle is ON.
- Check the Network tab to confirm requests are being sent.
- Try the DevTools panel instead of the popup (panel uses
chrome.devtools.network, which may capture more).
No. The extension uses chrome.storage.local (10MB limit). Sync storage is not used since rules may contain large response bodies.
No. The extension only intercepts HTTP requests (XHR, Fetch) via Chrome's Fetch domain. WebSocket is not supported.
Yes. Import always writes into the domain that's currently active in the panel, regardless of which domain the file's domain field says it was exported from — but if that field doesn't match the current domain, a confirm dialog warns you first, so the mismatch isn't silent.