Random API Response Generator

Fake REST API JSON responses for frontend mocking

Ad placeholder (leaderboard)

Mock a backend before it exists

The Random API Response Generator produces plausible JSON for the resources a typical REST API returns — users, products, orders and analytics events. It lets frontend work continue before the real endpoint is built: paste the output into a mock server, a fixture file, or a fetch stub and develop against a realistic response shape.

How it works

Each resource type has a template describing its fields and the JSON type of each one. For every requested record the generator fills that template from curated value pools — names, product titles, categories, currencies — and from small helpers that emit a UUID-style id, an ISO 8601 timestamp, or a two-decimal price. Orders additionally build a nested items array and sum the line totals so the total field is internally consistent. The whole structure is serialized with JSON.stringify and indented, which guarantees the result is valid, parseable JSON.

A seeded pseudo-random source keeps a given configuration stable between renders; pressing Regenerate advances the seed for a fresh set. Turning on the envelope option wraps a multi-record array as { data, meta } to match the pagination shape many APIs use.

Tips and example

  • For a single-object endpoint such as GET /users/:id, set the count to one and leave the envelope off to get a bare object.
  • For a list endpoint such as GET /products, raise the count and enable the envelope so your mock includes meta.total for pagination logic.
  • A generated order keeps its total equal to the sum of its line items, so it is safe to test cart and checkout rendering against it.
  • Treat every value as placeholder data — the names and emails are synthetic and must never stand in for real records.
Ad placeholder (rectangle)