Mock JSON Data Generator
100% private — runs on your device, never uploaded. Works offline once loaded.
Design a template object using tokens such as {{firstName}}, {{email}}, {{uuid}}, {{int:1-100}} and {{bool}}, then generate an array of realistic mock records. Everything is produced locally with cryptographic randomness.
Template-driven mock data
Realistic test data is one of the most tedious things to write by hand. This generator flips the job around: you describe the shape you want once, as an ordinary JSON object whose values are placeholder tokens, and the tool fills that shape N times. Because the template is plain JSON, you keep full control over nesting, key names, arrays and literal values — only the tokens get replaced.
A token looks like {{firstName}} or {{int:18-65}}. The generator walks your template recursively, and wherever it finds a token it substitutes a freshly generated value. Anything that is not a token — fixed strings, numbers you hard-code, structural nesting — is copied through unchanged, so you can mix constant fields with generated ones.
The token set and how types are preserved
The built-in tokens cover the fields you reach for most: names ({{firstName}}, {{lastName}}), contact details ({{email}}), location ({{city}}), identifiers ({{uuid}}), flags ({{bool}}), dates ({{date}}), and numeric ranges ({{int:min-max}}). Names, cities and email fragments are drawn from small curated word lists so the output reads naturally rather than as random gibberish.
- A value that is exactly a single token keeps its native type: {{int:1-100}} becomes a JSON number, {{bool}} a true/false boolean, and {{uuid}} a string.
- A token embedded in a larger string is inserted as text — "user-{{int:1-9}}" produces "user-7".
- {{int:min-max}} accepts any integer bounds, including negatives, and the order of min and max does not matter.
- Unrecognised tokens are left exactly as written, so a typo never silently disappears.
Why local generation beats an online faker
Every record is built in your browser using crypto.getRandomValues, the same cryptographically strong source used for security tokens. That means good statistical spread across values and no dependency on a remote API that might rate-limit you or log your schema.
Press Regenerate as many times as you like to get a completely new batch — useful for snapshot tests, seeding a local database, populating a Storybook, or demoing a UI with believable content. Because nothing leaves the page, you can safely model internal data structures without worrying about leaking your schema to a third party.
Frequently asked questions
How do I generate a random number in a range?
Use {{int:min-max}}, for example {{int:18-65}} for an age or {{int:1000-9999}} for an order number. Bounds are inclusive and may be negative.
Can I nest tokens inside objects and arrays?
Yes. The template is walked recursively, so tokens work at any depth — inside nested objects, inside array elements, and inside arrays of objects.
Will the same value repeat across records?
Each record is generated independently with fresh randomness, so repeats only happen by chance. With small word lists (names, cities) some overlap is expected across many rows.
Are the UUIDs valid version-4 UUIDs?
Yes. They use the browser's crypto.randomUUID where available, and otherwise a version-4 UUID built from crypto.getRandomValues with the correct version and variant bits set.
Is any data sent to a server?
No. The template is parsed and filled entirely in your browser; nothing is uploaded, so it is safe for modelling private or internal schemas.
What if my template is not valid JSON?
The tool reports the JSON parse error inline and waits until the template is valid before generating records.
Advertisement