How to use Mock JSON Generator
- Write a JSON template and put {{tags}} inside string values.
- Wrap repeating objects in an array whose first element is "repeat(5)".
- Optionally set a seed, then click Generate or Regenerate.
- Copy or download the mock.json output.
Mock JSON Generator features
- Sixty-plus placeholders: names, emails, ids, numbers, booleans, dates, picks, lorem text, contact, business and location values
- ["repeat(n)", …] and ["repeat(a-b)", …] array expansion with {{index}}
- Typed output: a value that is exactly one tag becomes a number, boolean or null
- Names, emails and usernames stay consistent within an object
- Optional seed for reproducible fixtures; Regenerate for fresh data
- No eval, no network — the template is parsed as JSON and rendered in the browser
Mock JSON Generator example
Two users with typed fields
Input:
{ "users": ["repeat(2)", { "id": "{{index}}", "name": "{{name}}", "email": "{{email}}", "age": "{{int:18-65}}", "active": "{{bool}}" }] }Output:
{
"users": [
{ "id": 0, "name": "Nicholas Reed", "email": "nicholas.reed@example.org", "age": 21, "active": false },
{ "id": 1, "name": "Caleb Whitaker", "email": "caleb.whitaker@example.com", "age": 64, "active": true }
]
}Frequently asked questions about Mock JSON Generator
Which placeholders are available?
Names, emails and usernames (consistent within an object), uuid/ulid/id/index, int/float/price/percent, bool/null, date/datetime/unix with past, future, recent or year ranges, pick:a|b|c, lorem/sentence/paragraph, phone/url/color/ip/mac/hex/token, company/job/product, street/city/country/lat/lng and more — see the reference below the output.
How do I repeat objects?
Make the array's first element "repeat(5)" (or "repeat(2-5)" for a random count) followed by the element template. {{index}} gives the position inside the repeat.
Are values typed?
A string that consists of exactly one tag becomes a real number, boolean or null in the output. Tags embedded in text stay strings ("Order {{int:1-9}}").
Is the output reproducible?
Enter a seed to get identical data on every run; leave it empty for fresh random data with the Regenerate button. Nothing is evaluated as code and nothing leaves the browser.
Is the data real?
No. All names, emails (example.com domains), phone numbers (555 range) and addresses are synthetic test data.
Technical notes
Tags follow the grammar {{name}} or {{name:argument}} and are resolved from a fixed registry; unknown tags are left verbatim with a warning, so no user input is ever executed. Per-object scopes memoise the first and last name so {{name}}, {{email}} and {{username}} agree, while each repeat() iteration and array element gets a fresh scope.