Skip to content
API & TESTING TOOLS

JSON Mock Data Generator Online

Generate fictional JSON records for development.

  • Free
  • No signup
  • Runs in your browser

This tool runs in your browser. The text you enter is processed on your device and is not sent to NHP Learning.

JSON Mock Data Generator

About JSON Mock Data Generator

Mock data lets a front-end developer build a screen before the back end exists. This tool generates a JSON array of fictional records with an id, a name, an email address and an active flag, which you can serve from a static file, a mock server such as json-server, or a test double in your code.

Type how many records you need, from 1 to 50. The records are deterministic, so the same number always gives the same data. That keeps screenshots, snapshot tests and documentation examples stable between runs.

How to use JSON Mock Data Generator

  1. Type how many records you need, from 1 to 50.
  2. Click Run Tool to generate the JSON array.
  3. Save it as a .json file, import it into your mock server, or paste it into your component or test.

Example

Input

4

Output

[
  {
    "id": 1,
    "name": "Aman",
    "email": "user1@example.com",
    "active": true
  },
  {
    "id": 2,
    "name": "Kiran",
    "email": "user2@example.com",
    "active": false
  },
  {
    "id": 3,
    "name": "Simran",
    "email": "user3@example.com",
    "active": true
  },
  {
    "id": 4,
    "name": "Gurpreet",
    "email": "user4@example.com",
    "active": false
  }
]

Common uses

  • Building a table, list or dashboard before the API is ready.
  • Creating a db.json file for json-server or a fixture for a testing library.
  • Preparing stable example responses for API documentation.

Privacy and safety

This tool runs in your browser. The text you enter is processed on your device and is not sent to NHP Learning.

Frequently asked questions

Is the data random each time?

No. It is deliberately predictable so tests and screenshots do not change. Use the UUID Generator when you need random identifiers.

Can I add my own fields?

Paste the output into the JSON Formatter, add fields by hand and then convert it with the JSON Schema Generator to document the structure.

Is the data real?

No. All names are fictional and the emails use example.com, a domain reserved for documentation.

Learn to build this yourself

Free tutorials and courses on NHP Learning cover PHP, JavaScript, SQL and WordPress, from the basics to real projects.