About Mock JSON
Generate mock JSON from preset shapes (user, post, product, address, payment, comment) or define your own schema. Pick item count (1-1000), nesting depth, and whether arrays embed inline. Output is realistic-shaped JSON suitable for stub APIs, fixture files, and Storybook stories.
Why mock JSON shape matters
Real APIs return objects with specific structure — users is an array, user.id is a string, user.address.country is two letters. A hand-rolled mock that gets the structure wrong wastes more time than not having a mock. Generated mocks based on real shapes save the setup tax.
Preset shapes
- User — id, name, email, avatar, role, createdAt
- Post — id, title, body, author, tags, publishedAt
- Product — id, name, sku, price, currency, stock, category
- Order — id, status, items[], total, customerId, createdAt
- Comment — id, postId, author, body, createdAt
- Address — street, city, state, zip, country, lat, lng
- Payment — amount, currency, method, status, fees
- Event — id, type, source, timestamp, payload
Output options
- Array of items —
[{...}, {...}] - Single item —
{...} - Paginated —
{ data: [...], page, total, hasMore } - NDJSON — one object per line for streaming consumers
Common workflows
Stand up a stub API. Generate 50 users as paginated JSON, drop into a users.json file, mock-server points at it. Frontend works against fake data while backend is being built.
Fill a Storybook table. Generate 20 row objects, paste into the story file. The grid renders with realistic content.
Stress-test a list view. Generate 1000 items, set as the data prop. Watch your virtual scroller, sort, and filter handle the load.
Schema-first design. Sketch the shape in this tool, get JSON, share with backend. The schema becomes the contract.
Why generated locally
A JSON mock generator does no harmful work — but it also has no business calling a server. Local generation is faster, available offline, and produces no telemetry. Open the tool, get the JSON, move on.
Frequently asked questions
How is this different from Fake Data?
Can I customize the shape?
How nested can JSON go?
How many items can I generate?
Is the output deterministic?
Can I generate paginated API responses?
{ data: [...], page: 1, total: 100, hasMore: true } structure ready for stub-server use.Related tools
Last updated: 2025-01-15