ApiSimul logo ApiSimul — the switchboard
N°01

Mock any API / from the browser

A Rules
Checking operator status…
◎ No rules on the board.
Create one, or load the sample set.
01 Rule editor
{{random.name}} {{random.email}} {{number.int 1 100}} {{string.uuid}} {{bool}} {{date.iso}} {{image.avatar}} {{param.id}} {{#repeat 5}}
300 ms
B Call log 0 calls
No calls yet. Register the operator, then send a test request.

02 Why a switchboard for your API

Front-end work should not wait for back-end endpoints. ApiSimul plugs a mock operator into your browser: it answers the calls your app already makes, with the data shape you decide.

01 / INTERCEPT

Real interception, zero code changes

One click registers a Service Worker at the browser level. Your fetch() and XMLHttpRequest calls keep their real URLs — the operator answers before the network is ever touched. Uninstall it and everything returns to normal instantly.

02 / ROUTE

Path params like a real router

Define routes such as /api/users/:id or /posts/:slug/comments. Captured segments feed back into the response through {{param.id}}, so the mock behaves like a resource-aware endpoint, not a static file.

03 / FABRICATE

Dynamic fake data, every call

Placeholders render fresh on each request: names, emails, UUIDs, integers in range, timestamps, avatars, and {{#repeat 5}} blocks that build whole JSON arrays. Your UI gets realistic lists and detail pages to lay out against.

04 / THROTTLE

Latency and status you control

Set 0–3000 ms of simulated delay and any status from 100 to 599. Reproduce the slow endpoint that breaks your spinner, the 404 that tests your empty state, or the 500 that exercises your error handling.

05 / OBSERVE

A live call log on the board

Every intercepted call is written to the log with time, method, URL, status, and whether it was mocked or passed through. Watch the switchboard light up as your app runs — debugging the request flow becomes reading a tape.

06 / CARRY

Rules travel with your team

Rules live in your browser's IndexedDB — nothing is uploaded. Export the whole board as JSON, commit it next to your front-end code, and teammates import the exact same mock set in one click.

03 Placeholder cheat sheet

Drop these into any response body. Unknown placeholders pass through untouched, so your templates never break.

PlaceholderReturnsExample output
{{random.name}}Full name from a seeded poolGrace Hopper
{{random.email}}Email built from the name poolalan.turing@test.dev
{{number.int 1 100}}Integer between min and max42
{{number.float 0 1 2}}Float with given decimals0.37
{{number.bool}}Literal true / falsetrue
{{string.uuid}}UUID v43f8a1c…
{{string.lorem 12}}N lorem wordslorem ipsum dolor…
{{string.id}}Short random identifierk3x9qz1a
{{date.iso}}Current time, ISO 86012026-08-23T09:41:07Z
{{date.timestamp}}Current time in milliseconds1755938467000
{{image.avatar}}SVG avatar as data URI (offline)data:image/svg+xml,…
{{image.url 640 480}}Photo URL at the given sizehttps://picsum.photos/…
{{param.id}}Value captured from :id in the route42
{{index}}Iteration index inside a repeat block0, 1, 2…
{{#repeat 5}} … {{/repeat}}Repeats the block N times as a JSON array[{…},{…},…]

04 Questions on the line

How does the interception actually work?
A Service Worker is a script your browser keeps between the page and the network. ApiSimul's worker listens to the fetch event, compares each request against your rule board, and answers matches itself. Non-matching requests pass through untouched, which is why registering the operator never breaks normal browsing of the site.
Which requests can be intercepted?
Service Workers operate per origin, so the interception covers fetch calls issued from pages on apisimul.com. Use the test pad in the Call log panel to fire requests at your mocked routes and watch them being answered. To mock your own development site, run its front-end locally and point its API base URL at the same origin as a registered worker.
How do I make a list endpoint return 20 items?
Wrap one item object in a repeat block: {{#repeat 20}}{"id": {{index}}, "name": "{{random.name}}"}{{/repeat}}. Each iteration gets fresh random data and an {{index}} counter, and the block renders as a valid JSON array you can assign to a key in your response body.
Why does the page ask me to reload after registering?
Browsers activate a Service Worker for pages loaded after registration. A single reload lets the operator take control of the current page — the status lamp turns green when interception is live, and stays amber until you do.
Are my rules and logged requests private?
Yes. Rules and logs are written to IndexedDB in your browser and never leave your machine. There is no account, no sync, and no server-side storage. Clearing the site's browser data removes them; use Export to keep a copy.
Can I stop mocking just one endpoint?
Toggle the switch on that rule card and requests to its route immediately pass through to the real network while the rest of the board keeps answering. Unregister the operator to switch everything off at once.

Built for the gap between backend and frontend

When the backend is still in flight and your UI needs real network behavior to test against, apisimul sits inside the browser as a service worker and intercepts fetch calls before they leave the page. Frontend developers, QA engineers, and anyone wiring up a prototype can register an operator, define rules with path params, and serve mock responses with custom latency and status codes. No proxy server to run, no code changes in your app, no environment variables to chase. Toggle rules off and live traffic flows through untouched.

From install to first mocked response

  1. Click Register Operator to install the service worker that intercepts fetch calls on your page.
  2. Press New rule, then pick a Method and type your Request path using path params if needed.
  3. Set the Status, add Response headers, and paste a Response body with placeholders for dynamic data.
  4. Enter a Simulated latency value so the mock behaves like a real network round-trip.
  5. Keep Rule enabled checked, then trigger your app and watch the call land in the live log.

Browse the conversion library

Every unit pair has a dedicated page with the exact factor, a full value table and a worked example.

Latest Articles

How Do QA Engineers Mock Path Parameters and HTTP Headers for Local Backend Testing
If you've spent any real time in QA, you already know the feeling. You built a solid mock suite last sprint. Everything passed.
Using Browser Service Workers as a Prototyping Tool for Mock Server API Testing
Here's a scene I keep walking into: a frontend engineer sets up a standalone Express server on localhost:3001 just to return canned JSON for an API that doesn't exist yet.
Intercepting Fetch API Requests to Inject Dynamic Placeholders for Frontend Testing
It's 4:47 PM on a Friday. Your product manager just pinged you on Slack: "Can you demo the new analytics dashboard to the stakeholders at 5:30?"
How to Test Custom Status Codes and Request Latency in Local Development Mock Servers
A 2024 review of postmortems from a mid-sized fintech stack surfaced a number worth pinning to your monitor: 73% of customer-facing API failures traced back to status codes and latency patterns that never appeared in local development.
API Mock Tools 2026: 5 Steps Fake JSON Saved My Sprint
Discover how api mock tools using service workers and fake JSON rescued my frontend build. Follow these 5 practical steps to code faster in 2026. Read now!
Stop Mock API Tantrums: Override HTTP Headers Easily
Stop treating mock APIs like stubborn mules. Learn to override HTTP headers with API mock tools for painless browser debugging. Read the guide and fix CORS!
Api Mock Tools: 3 Fetch Interceptors Cut Prototyping 80%
Want a local mock server fast? Our tests prove fetch API interception cuts frontend prototyping by 80%. Compare top api mock tools today. Read the full review!
Generating Fake JSON with Dynamic Placeholders for QA Engineers Testing Path Parameters
A 2024 analysis of 12,000 API test runs across enterprise QA teams revealed that 67% of production-breaking bugs slipped through because path parameters were tested with static, hardcoded mock values.
API Mock Tools: Browser Overrides Versus Server Mocks
Simulate API latency and custom status codes. Compare browser developer tools versus api mock tools from a real project. See which wins. Read the breakdown.
How to Configure Service Worker Fetch Interception for Local API Mocking Without a Backend
Your payment processing dashboard—the one you've been building all week—loads to a blank screen.
3 API Mock Tools: Intercept Fetch, Ship UI 40% Faster
Ditch backend delays. Use service workers as API mock tools to intercept fetch calls and ship UI 40% faster. See our worked example and prototype today!
API mock tools: Fix Local Header & Status Code Tests
Use API mock tools to test custom HTTP headers and status codes locally. We expose common testing mistakes and show you exactly how to fix each one. Read more.
API Mock Tools 2026: 3 Dynamic Fake JSON Path Flaws Fixed
Fix dynamic fake JSON errors. Learn evidence-led solutions for path parameters in API mock tools. Use this concrete 2026 checklist and build flawless mocks now.
Fetch Interception Beats API Mock Servers: No Setup
Ditch clunky API mock tools. Fetch interception lets you mock data right in your browser, saving 4 hours of server setup. See our 5-minute example. Read it now!
API Mock Tools: Fix Latency & HTTP Header Mistakes
Learn api mock tools: simulate request latency and custom HTTP headers. We expose typical setup mistakes, fix each flaw, and configure servers properly. Read!
API Mock Tools: Isolate Edge Cases Without a Server
Tired of backend delays breaking frontend tests? Learn how service worker API mocking isolates edge cases without a server. Read this real-world fix today.
3 API Mock Tools Mistakes Wrecking Local Dev Flow
Building a local development mock server with dynamic fake JSON? Avoid these 3 common API mock tools mistakes, fix your dev flow, and ship faster. Read the fixes!
Intercepting fetch API requests to simulate network latency for QA engineers
You wrote a loading skeleton. You added a timeout fallback. You even built a retry button.
How to configure a local mock server for custom status codes without backend dependencies
You fire up your local mock server, configure what you think is a pristine 500 Internal Server Error response, hit the endpoint from your frontend app, and—bam—you get a 200 OK with your error…
Why Most API Mock Tools Miss Edge Cases: Dynamic Fixes
Stop hardcoding mock data. Discover how dynamic placeholders in API mock tools effortlessly simulate edge cases. Read our guide and fix your tests today!
API Mock Tools: Debug Fake JSON Two Ways, Fast
Debug fake JSON in API mock tools the right way. Compare two proven browser debugging methods and fix mock data issues fast. Start debugging smarter today.
API Mock Tools: Mock Headers & Path Params 3x Faster
See how api mock tools cut frontend prototyping by 40%. We mock path parameters and HTTP headers using a real 3-step worked example. Run these quick tests now!
Simulate Fetch Latency: Fix API Mock Interception Bugs
Simulating network request latency? Avoid fetch API interception traps. Discover practical fixes for robust API mock tools. Read our pitfall guide right now!
Why QA engineers should use dynamic placeholders in fake JSON mock servers
If your fake JSON mock server still returns the same hardcoded UUID in every response, you're testing your assertions, not your API.
How to simulate custom HTTP status codes using service worker fetch interception
You know the drill. Your backend team just told you the payment gateway will return a 419 Authentication Timeout under certain conditions, and they need the frontend to handle it gracefully before next week's deploy.
API Mock Tools: Fix Dynamic Path & Custom Status Fails
Stop failing local frontend tests. Fix common service worker interception mistakes. Our api mock tools guide helps mock dynamic paths & custom status codes. Read now!
How to Mock API Path Parameters and Custom Status Codes Using Service Worker Fetch Interception in Local Development
It's 6:45 PM on a Thursday. Your pull request for the project settings page has been approved, but your QA engineer just flagged something troubling: when she manually changed a URL to visit a…
API Mock Tools: 4 Steps Mock Fetch JSON & Status Codes
Build api mock tools fast! Intercept fetch, return dynamic JSON, and set custom status codes via service workers in 4 steps. Grab this checklist & start!
Intercept Fetch API with Service Workers | API Mock Tools
Learn to intercept Fetch API requests with service workers for local API mocking. Build powerful api mock tools to test apps faster. Read our full guide now!
Intercept Fetch API: Mock JSON with Dynamic Placeholders
Learn to intercept Fetch API requests using service workers to return fake JSON with dynamic placeholders. Boost your testing with top API mock tools. Read now!

View All Articles →