Mock JSON Generator

Describe each field on its own line, such as "age: int(18, 90)", and get an array of fake records to test with. The data is made on this device, and every email address uses a reserved example domain.

How it works

The schema is one field per line: a name, a colon and a type, with optional settings in brackets. int(18, 90) is a whole number from 18 to 90, pick(free, pro, team) is one of those values, and date(2024-01-01, 2024-12-31) is a date in that range. Blank lines and lines starting with # are ignored.

Each record is built by going down the schema and making a value for every field. Names come from short bundled lists. An email field uses the same record’s name, so Priya Okafor gets an address like priya.okafor@example.org, and the domain is always example.com, example.org or example.net, which are reserved for exactly this purpose.

Numbers, choices and dates are drawn with crypto.getRandomValues, evenly across the whole range including both ends. If a line has a mistake, the page names the line and says what is wrong instead of producing half the data.

How to use it

  1. 1 Write your fields in the Schema box, one "name: type" per line. The types are listed under the box.
  2. 2 Set How many records, from 1 to 10,000.
  3. 3 Read the JSON array that appears. If a line has an error, fix the line it names.
  4. 4 Copy the JSON or download it as a .json file. Regenerate makes a new set with the same schema.

Good to know

  • Add an "id: id" line first if your code expects records numbered 1, 2, 3 and so on.
  • pick() is the quickest way to get realistic categories: status: pick(active, active, active, paused) makes active three times as likely.
  • Values change on every Regenerate; there is no seed. If a test needs the same data every time, download a file and commit it.
  • The name lists are short and international, so names repeat in large sets. That is fine for layout and load testing, not for anything that measures names.

Browser support

  • Chrome 94 and later
  • Firefox 93 and later
  • Safari 16.4 and later
  • Edge 94 and later

These are the oldest versions with everything the tool uses. They are worked out from the tool itself, so they change when it does.

Version numbers checked on 2026-09-04.

From a four-line schema to a record, step by step

The easiest way to see what the generator does is to follow one record through it. Here is a small schema for a list of users, four lines long: "name: fullName", "email: email", "age: int(18, 90)" and "score: float(0, 5, 1)". Ask for one record and you might get this: {"name": "Priya Okafor", "email": "priya.okafor@example.org", "age": 37, "score": 4.2}. Every part of that record follows a rule you can check.

The name comes first. The generator picks a first name and a last name at random from two short bundled lists, here Priya and Okafor, before it looks at any field. That matters for the next line. The email type does not invent a new person; it reuses the same record’s first and last name, lower-cased and joined with a dot. About half the time it adds a number from 50 to 99, as people do when their plain name is taken. Then it picks one of three domains: example.com, example.org or example.net. Those three are reserved by RFC 2606 so that documentation and tests can use them safely. Fake data has a way of escaping into staging systems that really send mail, and this guarantees the mail goes nowhere.

The age line asks for a whole number from 18 to 90. Both ends count, so there are 73 possible values: 90 minus 18 is 72, plus one for the end. The generator draws one of those 73 with equal chance. It uses crypto.getRandomValues and throws away any random value that would make some ages more likely than others, so 18 and 90 come up exactly as often as 37. A common shortcut, Math.floor(Math.random() * 72) + 18, quietly never produces 90 at all, which is the kind of bug that only shows up when a test needs the edge.

The score line asks for a decimal from 0 to 5 with one decimal place. The generator works in steps of 0.1: it multiplies the range by 10, so 0 to 5 becomes 0 to 50, draws one of those 51 whole numbers, and divides by 10 again. The result is always a clean value like 4.2 or 5, never 4.2000000001, and 0.0 and 5.0 are as likely as anything in between. With a third argument of 2 you would get 501 steps of 0.01 instead.

Now ask for 1,000 records and the same thing happens 1,000 times, each record independent of the others, then the whole array is written as indented JSON. A schema error stops the run before anything is made, with the line number and the reason: a type spelled wrong, a range written backwards, or the same field name used twice.

The limits are deliberate. Records are flat, so there are no nested objects or arrays. The name and city lists are small, so a large set repeats them. Values are spread evenly, which is right for testing edges but wrong for anything that needs real-world distributions. And there is no seed, so each run is different; when a test needs fixed data, download the file once and keep it.

Frequently asked questions

Can I make nested objects or arrays?

Not yet. Each record is flat: one level of fields with strings, numbers and true or false. Wrap or reshape the output in your own code if you need nesting.

Could a fake email address belong to a real person?

No. Every address ends in example.com, example.org or example.net. RFC 2606 reserves those domains for documentation and testing, so mail to them can never reach anyone.

Is the data realistic?

It has the right shape and believable values, which is what forms, tables and APIs need. It is not statistically realistic: ages are spread evenly, not like a real population, and cities are picked from a short list.

What is the largest set I can make?

10,000 records. That is plenty for paging and performance tests, and the cap stops a stray extra zero from freezing the page.

Is my schema or data uploaded?

No. Everything is built in your browser. Nothing you type and nothing it makes leaves this page.

Related tools

Your files are processed on your device and are not uploaded. You can verify this in your browser’s developer tools under the Network tab.