Skip to content
Cuisdev

Mock JSON Generator

Generate realistic fake JSON from a simple schema

  • Runs in your browser
  • No sign-up
  • Free forever
Loading the tool…

How to use the Mock JSON Generator

  1. 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. 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. 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. 4

    Keep the seed to get the same data every time, or press Reroll (Ctrl+Enter) for a fresh set.

  5. 5

    Open Placeholders to see every generator with an example, and click one to copy it.

  6. 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.

PlaceholderExample 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

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?
Mock data lets you build and test a front end before the real API exists, seed a development database, write repeatable unit tests and demo an interface without exposing real customer records. Generating it from a template means the shape matches your API exactly while the values look realistic.
How do I generate a list of records?
Make the top level an array whose first element is "{{repeat(25)}}" and whose second element is the object to repeat. Use "{{repeat(10,50)}}" for a random count in a range. Repeats can be nested, so each user can have a list of orders, and {{index}} gives each item its position.
Why is my number generated as a string?
A placeholder keeps its native type only when it is the entire string, as in "age": "{{number.int(18,80)}}". If the string contains other text, the result is text. Remove the extra characters inside the quotes to get a number or boolean.
Will I get the same data again?
Yes. Generation uses a seeded random number generator, so the same template and seed produce identical output. Dates are measured from the start of the current day in UTC, so relative dates such as {{date.past}} stay stable for the whole day. Press Reroll for a new seed.
Is the generated data real?
No. Names, companies and addresses are combined at random from built-in lists, emails use reserved example domains, and image links point at a public placeholder image service. The data is safe to commit to a repository or show in a demo.
Is my template uploaded anywhere?
No. The template is parsed and the data is generated by JavaScript in your browser tab. Your template is saved only in this browser so it is there next time, and you can clear it at any time.

Last updated .