Response mocking, without the detour

Mock status codes and responses.

A focused Chrome extension for replacing Fetch and XHR response status codes and bodies with local URL rules. Test every edge case without changing your API.

Under Chrome Web Store review

See how it works
Chrome 118+Fetch & XHRLocal rules onlyManifest V3
Real StatusMock extension popup with enabled 503 and 401 response rules, captured from the unpacked Chrome extension
Captured from the real extension with Playwright

Built for failure paths

Make the browser see the response you need.

StatusMock keeps the workflow deliberately narrow: add a URL rule, choose a status, write a response body, and enable it for the current tab. The next matching request receives your local response.

No proxy setup, test-server branch, or application-code change is required. Turn the tab switch off and the real API is back.

Three small steps

From real response to edge case in seconds.

  1. 01

    Match the endpoint

    Paste a full URL and use wildcards for dynamic path segments or query values.

    https://api.example.com/orders/*
  2. 02

    Shape the response

    Set an HTTP status and add the JSON or text body your UI should receive.

    503 · {"error":"Try again"}
  3. 03

    Enable the tab

    Flip StatusMock on for the current tab, reload, and test the real user flow.

    Mocking active

Feature set

Just enough control to make edge cases routine.

01

Override response status codes

Return any HTTP status from 200–599 for matching Fetch and XHR requests.

02

Replace response bodies

Respond with JSON or plain text while keeping safe headers from the original response.

03

Match complete URLs

Use simple * and ? wildcards to target one endpoint or an entire API path.

04

Switch per browser tab

Enable mocking only where you need it. Every new tab starts cleanly turned off.

05

Keep the first matching rule

Arrange rules in a predictable order; the first enabled match wins.

06

Store everything locally

Rules remain in Chrome extension storage and never leave your browser.

Common uses

When the real API will not fail on cue.

Build and review the awkward states before a user finds them.

  1. 01

    Preview empty, loading, unauthorized, and server-error states on demand.

  2. 02

    Reproduce a production response without touching the backend.

  3. 03

    Demo recovery flows even when every real service is healthy.

  4. 04

    Unblock frontend work before an API edge case is implemented.

  5. 05

    Keep QA scenarios repeatable with saved URL rules.

FAQ

The practical details.

What requests can StatusMock modify?

StatusMock modifies Fetch and XMLHttpRequest responses in explicitly enabled Chrome tabs. Normal page navigations and other request types are left alone.

Can I return JSON and plain text?

Yes. Valid JSON is formatted in the editor, while any other non-empty value can still be returned as plain text.

How do URL patterns work?

Patterns match the complete URL. An asterisk matches any number of characters and a question mark matches exactly one character.

Why does Chrome show a debugging banner?

Replacing response bodies requires Chrome’s debugger permission and the DevTools Protocol. StatusMock attaches only to tabs you explicitly enable while a valid rule exists.

Does StatusMock send data anywhere?

No. StatusMock has no analytics, tracking, external services, or developer-controlled servers. Your rules stay in local browser storage.

Ready when the API is not

Start testing the response your UI dreads.

Under Chrome Web Store review