Mock API Generator
Define a JSON template with {{tokens}} and generate realistic mock data instantly. Use {{name}}, {{email}}, {{int:1-100}}, {{pick:a,b,c}}, and 20+ other token types. Generate up to 50 records and download as JSON.
Token reference
Click a token to append it to the template
Features
22+ token types
Name, email, phone, UUID, int, float, boolean, date, city, color, and more
Custom pick lists
{{pick:draft,published,archived}} generates from your own value set
Nested support
Tokens work at any depth inside nested objects and arrays
Bulk generation
Generate 1, 5, 10, 20, or 50 records at a time
Download JSON
Save the output as a .json file for use in your project
Browser-only
No server — your template and generated data stay on device
How to use
- 1
Write a template
Define any JSON structure using {{tokens}} for fields you want randomized.
- 2
Set record count
Choose 1, 5, 10, 20, or 50 records to generate at once.
- 3
Generate
Click Generate. Each {{token}} is replaced with a unique random value per record.
- 4
Export
Copy to clipboard or download as .json for use in your app or test suite.
Frequently asked questions
Can I use the output with json-server?
Yes. Save the output as db.json and run npx json-server db.json to instantly get a full REST API with GET, POST, PUT, and DELETE endpoints for your mock data.
What happens if I have an invalid JSON template?
The tool shows a JSON parse error before generating. Fix the template syntax first — the {{tokens}} must be inside a valid JSON string value (wrapped in double quotes).
Can I generate arrays of nested objects?
Yes. Your template can include an array field like "items": [{"name": "{{word}}", "qty": "{{int:1-10}}"}] and each record will generate a new random item.
Is each generated record independent?
Yes. Every record is independently randomized. The same token in two different records will produce different values each time.