Skip to content
Run here 100% in your browser, no upload, no login

Mock Data Builder

Turn a JSON template into batches of mock records with typed placeholders and a repeatable seed.

Placeholders

{{index}}{{int 1 100}}{{float 0 1 2}}{{bool}}{{uuid}}{{name}}{{firstName}}{{lastName}}{{email}}{{word}}{{sentence}}{{pick a b c}}{{date}}{{phone}}{{url}}{{city}}{{country}}{{company}}

Write placeholders unquoted, e.g. "score": {{int 1 100}}. A placeholder inside a quoted string is filled in place.

Same seed = same data. Leave it empty for a fresh random set on every run.

This tab generates plain JSON text. No mock server is started and no request leaves your browser - copy the result into your own mock layer.

How to use it

  1. Write one record as a JSON template in the left panel. Placeholders go in unquoted, for example "score": {{int 1 100}}.
  2. Set Records to the number of rows you want, from 1 to 1000.
  3. Type a Seed if you want the same data again next time. An empty seed produces a fresh random set on every run.
  4. Press Generate. The tool fills every placeholder, parses the result and prints a JSON array.
  5. Copy the array, or switch Snippet for to MSW, json-server or a plain JS module and copy a configuration block that already carries the records you generated. The json-server block is valid JSON with no comments in it.

A placeholder written inside a quoted string is filled in place, so "Hi {{name}}" works too.

Common use cases

Why it stays private

Generation is string work inside the tab. Your template, the generated records and the snippet never leave the device, so fixtures that mirror a real production schema stay on your machine.

FAQ

Q: Does it start a mock server or intercept fetch? A: No. It generates mock data locally and prints plain JSON text plus a snippet. Nothing is served, and no request is intercepted or sent.

Q: What happens if my template is an array? A: The array is parsed and its first element is used as the record template. That way a template copied out of an example still produces the number of records you asked for.

Q: Why are unknown placeholders replaced with null? A: An unrecognized placeholder cannot be filled with a sensible value, so it becomes null and its name is listed in the status line instead of failing the whole run.

Your data stays on this device

Mock Data Builder runs 100% locally. Everything you paste or drop is processed by your own browser and never transmitted. Nothing is stored on our servers — close the tab and it is gone.

Nothing you type is sent to a server, logged, or used for analytics. The page works even with your network disconnected after first load.