Free · Private · No signup
API Response Mocker
Generate a realistic JSON mock from a schema, example payload, field list, or TypeScript interface. Preview status, headers, and body, then copy fetch, curl, or JSON. Runs in your browser.
Payload definition
Choose how you describe the response. Generation stays in this browser tab.
JSON Schema, components.schemas, or a 200 application/json schema.
Items to emit for each array (1–25).
Same seed, same mock. Use Regenerate for a new sample.
Shown in the preview and sent with the hosted mock URL.
HTTP preview
Status, headers, and body update as you type. Copy JSON, fetch, or curl.
HTTP/1.1 200 OK
Headers
Content-Type: application/json
Body
{
"users": [
{
"id": 6011,
"name": "Katherine Thompson",
"email": "tim.hopper53@mail.test",
"createdAt": "2024-11-20T13:39:19.512Z",
"isActive": true,
"profile": {
"website": "https://mail.test/cinder/882",
"city": "Dublin"
}
},
{
"id": 3070,
"name": "Grace Hamilton",
"email": "tim.berners-lee1@mail.test",
"createdAt": "2025-11-14T10:12:49.674Z",
"isActive": false,
"profile": {
"website": "https://devs.local/atlas/267",
"city": "Austin"
}
},
{
"id": 1857,
"name": "Barbara Hamilton",
"email": "ada.hopper84@mail.test",
"createdAt": "2025-09-27T15:08:20.826Z",
"isActive": false,
"profile": {
"website": "https://mail.test/atlas/52",
"city": "Toronto"
}
}
]
}Encoded in the URL — not stored on a server. Do not put secrets in a mock you share.
Mock the response, not the whole backend
Frontend work stalls on missing endpoints. This mocker fills a JSON body that matches the shape you already have — schema, sample, or types — with emails, UUIDs, dates, and nested objects you can paste into tests. Point it at a schema, a sample payload, or a TypeScript type and it fills every field with values of the right shape.
JSON Schema, example JSON, a field list, or a TypeScript interface — including OpenAPI-ish schema snippets.
Preview HTTP/1.1 the way DevTools would: status line, response headers, then pretty JSON.
Email, UUID, dates, URLs, nested objects, and array length. Same seed, same mock; regenerate for a new one.
100% client-side generation. Payloads are not uploaded to a mock database.
How to use the API response mocker
- 1
Pick an input mode
Schema for JSON Schema or OpenAPI snippets, Example to remix a real payload, Fields for a quick list, or TypeScript for an interface.
- 2
Tune array count, seed, status, and headers
Set how many array items to emit, a seed for repeatable fakes, then the HTTP status and response headers you want the client to see.
- 3
Read the HTTP preview
The right pane shows status, headers, and body. Invalid JSON input shows a line-and-column error instead of a silent failure.
- 4
Copy JSON, fetch, or curl
Paste into tests, MSW, or the terminal. If the payload is small, a shareable /api/mock URL is generated too.
Frequently asked questions
What is an API response mocker?
An API response mocker builds a realistic JSON payload — plus status and headers — so you can develop UI, write tests, or demo a client before the real backend exists. This tool generates the body from a schema, example JSON, field list, or TypeScript interface.
Does this mock API tool store my payloads?
No. Generation runs in your browser. Schema, example JSON, and TypeScript never leave this tab. A shareable mock URL (when it fits) encodes the payload in the address itself — nothing is saved in a database.
What input formats can I paste?
JSON Schema (including OpenAPI-ish components/schemas or a 200 response schema), an example JSON object to clone the shape, a field list like id, email, createdAt: date, or a TypeScript interface. Invalid JSON gets a line-and-column error instead of a generic parse failure.
How do faker-like field types work?
Names such as email, uuid, url, createdAt, and city — or JSON Schema formats like email, uuid, uri, and date-time — get matching fake values. No extra library is loaded; generators stay local and seeded so regenerate is repeatable.
How do I copy fetch, curl, or JSON?
After a mock is generated, use Copy JSON for the body, Copy fetch for a fetch() or Response snippet, and Copy curl for a curl -i command against the hosted mock URL when one is available.
What is the shareable mock URL?
Small payloads can be compressed into /api/mock/… so fetch and curl hit a real HTTP response with your status, headers, and body. Large payloads stay local — copy JSON, fetch, or curl from the preview instead.
Is the API Response Mocker free?
Yes. No signup, no watermark, unlimited client-side mocks.