How to use the Mock JSON Generator
- 1
Write a JSON template on the left, or press Sample. Put placeholders such as {{name.full}} or {{number.int(1,100)}} inside string values.
- 2
To make a list, start an array with "{{repeat(10)}}" followed by the item to repeat, or use "{{repeat(3,8)}}" for a random count.
- 3
The generated JSON appears on the right as you type. Change the Records box to override how many items the top-level list produces.
- 4
Keep the seed to get the same data every time, or press Reroll (Ctrl+Enter) for a fresh set.
- 5
Open Placeholders to see every generator with an example, and click one to copy it.
- 6
Copy the result, download it as a .json file, or download a CSV when the data is a flat list.
Features
- Nearly 40 built-in generators for names, emails, addresses, companies, prices, dates, UUIDs, lorem text and more
- Repeat arrays a fixed or random number of times, nested as deep as you like
- Placeholders that fill a whole string keep their type, so numbers and booleans stay numbers and booleans
- Mix placeholders into longer text, such as greetings or descriptions
- Seeded output, so the same template and seed always give the same data
- Clear errors for invalid template JSON and typo suggestions for unknown placeholders
- Pretty or minified JSON, with copy, download and CSV export for flat lists
- Runs entirely in your browser with no sign-up and nothing uploaded
Realistic test data without writing a script
Every front end, test suite and demo needs data before the real data exists. Hand-writing a JSON fixture is slow and the result looks fake; writing a script with a data library takes longer than the task deserves. A template is the middle ground: write the JSON shape you want once, mark the values with placeholders, and get as many realistic records as you need.
The template is plain JSON, so it doubles as documentation of the structure. Keys, nesting and literal values pass through unchanged; only the placeholders are replaced.
How templates work
A placeholder is a name in double braces, optionally with arguments, such as {{number.int(1,100)}} or {{pick(draft,published,archived)}}. When a placeholder is the whole string value, the generated value keeps its type, so "{{boolean(0.8)}}" becomes true or false rather than text. Placeholders inside longer strings are written as text, which is how you build values like "Order {{index(1)}} for {{name.first}}".
Arrays become lists with a repeat marker as their first element. ["{{repeat(20)}}", { ... }] produces twenty objects, and repeats can be nested to any depth. The Records box overrides the top-level count without editing the template. To protect your browser, a template that would generate more than 50,000 items stops with a message.
| Placeholder | Example output |
|---|---|
{{name.full}} | Priya Sharma |
{{internet.email}} | lars.nielsen@example.org |
{{number.float(0,1,3)}} | 0.417 |
{{date.past(2)}} | 2025-06-11T08:42:19.000Z |
{{uuid}} | 3f2b9c1e-8a4d-4f6b-9c2e-1d7a5b8e0f34 |
Related tasks
Open the result in the JSON Editor to browse it as a tree or table, or turn a flat list into a spreadsheet with JSON to CSV. If you only need identifiers, the UUID Generator produces thousands at once.
Frequently asked questions
What is mock JSON used for?
How do I generate a list of records?
Why is my number generated as a string?
Will I get the same data again?
Is the generated data real?
Is my template uploaded anywhere?
Last updated .