Generate mock API JSON responses from a URL + method description. Part of the DevTools Surf developer suite. Browse more tools in the Developer Utilities collection.
Use Cases
Frontend developers building UIs before the backend is ready
QA engineers creating deterministic test fixtures
Mobile developers working offline with simulated endpoints
Technical writers generating example responses for API docs
Tips
Specify response status codes to test error handling
Include nested objects for realistic mock structures
Define array lengths to simulate paginated responses
Fun Facts
The concept of mock objects in testing was formalized in a 2000 paper by Tim Mackinnon, Steve Freeman, and Philip Craig at XP2000.
JSON became the dominant API response format around 2012, overtaking XML — despite Douglas Crockford specifying JSON back in 2001.
Netflix's Polly.js, released in 2018, popularized recording and replaying HTTP interactions for frontend testing.
FAQ
What does it generate?
Realistic-looking mock JSON based on the URL and method. GET /users returns a list of users; GET /users/123 returns a user object. Structure inferred from REST conventions.
Is it randomized?
Deterministic by default (same URL = same mock). Toggle randomization for varied test data. Useful for edge-case testing.
Can I customize the schema?
Limited — the generator infers structure from URL patterns. For custom schemas paste a JSON Schema and use Mock Data Generator instead.
Useful for what?
Frontend dev when the backend isn't ready, demo environments with fake data, and testing how your app handles various response shapes.