About this tool
Front-end work shouldn’t wait for the backend. Describe one item with a JSON template, and this generator produces realistic mock responses for the whole resource: paginated lists, single items, a 201 Created response, and the error bodies your UI must handle. It can also write the mock as a json-server database, Mock Service Worker handlers or a small Express server.
Template placeholders
The template uses the same placeholders as the Random JSON Generator: {{name}}, {{email}}, {{company}}, {{uuid}}, {{index}}, {{int:1:100}}, {{float:0:500:2}}, {{bool}}, {{pick:a|b|c}}, {{date:2024-01-01:2026-12-31}} and more. A value that is exactly one placeholder keeps its type.
Using the mocks
- json-server: save
db.jsonand runnpx json-server db.jsonfor a full CRUD API at/users. - Mock Service Worker: add the handlers to your MSW setup to intercept requests in the browser or in tests.
- Express: run
node mock-server.jsfor a mock on port 3001. - Errors matter: test your UI with the 404 and 422 bodies, which use the
application/problem+jsonshape from RFC 9457.
FAQ
How do I create a mock REST API?
Describe one item as a JSON template, pick the output (for example json-server db.json or MSW handlers), and copy it into your project.
What pagination formats are supported?
Page-based meta and links, cursor-based (has_more and next_cursor), offset and limit, or a plain array.
Can I generate error responses?
Yes: 404 Not Found and 422 validation errors in the RFC 9457 problem+json format.
Is the data realistic?
Yes. Names, emails, companies and dates are realistic but fake, and emails use reserved example domains.