Mock JSON API Builder
Generate a realistic JSON API response: a paginated list of fake records with metadata (total, page, next, prev cursors) and HTTP-style headers (ETag, Cache-Control, X-Request-ID). Useful for seeding test fixtures, populating a mock server, or designing API responses.
Sample headers
How to use the Mock JSON API Builder
Pick number of records, page size, response style, and record shape. Generate produces a realistic JSON document plus a sample header set you'd return alongside it. Use the JSON to seed a test database or feed a mock server (json-server, msw, mockoon).
Generating mock JSON API responses
Building or testing a client often means waiting on an API that does not exist yet, or hand-writing fixtures that never quite look like a real response — missing the pagination wrapper, the metadata, or the headers the real endpoint would send. That hand-rolled data tends to hide bugs that only surface against the real shape.
This generates realistic responses: a paginated list of fake records in the style you choose — a data envelope, JSON:API, HAL, or a plain array — together with a sample header set (ETag, Cache-Control, request id). Drop the output into a mock server like json-server or MSW, or use it as a fixture. To shape the records to a specific contract instead, the schema to example generator builds data from a JSON Schema.
Common use cases
- Unblock frontend work — mock an endpoint before the backend ships.
- Seed a mock server — feed json-server, MSW, or Mockoon realistic data.
- Test pagination — generate multi-page responses with cursors and totals.
- Match a style — choose a data envelope, JSON:API, HAL, or plain array.
- Design a response — prototype the shape of an API before building it.