Account

What new tool do you want?

Developer Tools

Mock API Endpoint Generator

Create a mock REST endpoint in seconds — pick the status code, JSON/XML/text body, custom headers and delay — and call it from your app with CORS enabled.

How to use

  1. 1Set the status code, content type, body and optional headers or delay.
  2. 2Create the endpoint and copy its URL.
  3. 3Call it from your front-end, tests or Postman.

Frequently asked questions

How long does a mock last?

7 days.

Can it return errors?

Yes — choose 4xx or 5xx status codes, and add a delay to test loading states and timeouts.

What can't it do?

It can't serve HTML pages, set cookies or redirect, and it's publicly readable by anyone with the URL — so never put secrets in it.

A real endpoint, not a mocking library you wire into your code

Tools like MSW or json-server mock requests inside your own app or a local process you have to run and keep alive. This generates an actual publicly reachable URL (any HTTP method, CORS enabled) that exists independently of your codebase — useful specifically when the thing calling it isn't your code at all: a teammate's Postman collection, a no-code tool like Zapier or Make, a mobile app build, or a front-end deployed to a preview URL that needs a backend before the real one is ready.

What you can simulate, and the three things you can't

Status code, content type (JSON, plain text, XML or CSV), response body, custom headers and an artificial delay are all configurable, which covers the common front-end testing needs: error banners for 4xx/5xx, loading spinners via delay, and parsing logic against real JSON shapes. It can't serve HTML pages, set cookies, or issue redirects, and because the body is returned byte-for-byte to anyone who has the URL, it's explicitly not a place to put real data or secrets — mocks expire after 7 days specifically so nothing lingers.

Worked example: simulating a rate-limited API

Set status to 429, content type to application/json, the body to {"error": "rate_limited", "retry_after": 30}, add a response header Retry-After: 30, and set the delay to 2000 ms to mimic a server under load. After creating the endpoint, pressing 'Try it' performs a real fetch against the generated URL and reports back exactly what was configured: HTTP 429 after roughly a 2-second wait, with the JSON body shown verbatim — letting you test a front-end's retry-after handling and loading state against a predictable, repeatable failure instead of waiting for the real API to actually rate-limit you.

CORS is on by default because the typical caller isn't your server

Most hand-rolled mock servers default to blocking cross-origin requests the same way a real API would, which means a quick local mock often needs its own CORS configuration before a browser-based front-end can even call it. Since the entire point of this tool is being called from wherever your front-end happens to be running — a local dev server on one port, a Netlify or Vercel preview URL, a CodePen — every generated endpoint ships with permissive CORS headers already in place, so there's no separate step to allow cross-origin fetch calls. The trade-off is the same one that makes the 7-day expiry non-negotiable: an endpoint reachable from any origin with no auth is also readable by anyone who has or guesses the URL, which is the whole reason secrets and real data are off-limits here even temporarily.

Related tools

More: Developer Tools