MergeJSON

How to Generate Mock JSON Data

Learn how to generate mock JSON data from a template, use realistic fields like name/email/date, create nested arrays, choose record count, and export JSON with no signup.

Published June 14, 2026

Mock JSON data is useful when an API is not ready yet, a frontend needs realistic responses, a test suite needs fixtures, or a demo needs sample records that look believable. A good JSON generator should let you define the shape of the data, choose how many records to create, and export the result without signing up.

This guide shows how to generate mock JSON data from a template, use realistic fields like names, emails, dates, UUIDs, and prices, and create nested data for API-style responses.

The quickest way: generate mock JSON online

Open the JSON Generator, load the sample template, choose a record count, and press Generate Mock JSON. The tool replaces placeholders with realistic values and outputs an array of generated records.

Everything runs in your browser, so your template and mock data are not uploaded.

Use it when: you need test JSON data for frontend prototypes, API mocks, demos, seed files, QA fixtures, or documentation examples.

Start with a JSON template

A template is normal JSON with placeholder strings:

{
  "id": "{{id}}",
  "name": "{{name}}",
  "email": "{{email}}",
  "createdAt": "{{dateTime}}",
  "active": "{{boolean}}"
}

Generating three records returns:

[
  {
    "id": 1001,
    "name": "Ada Lovelace",
    "email": "ada.lovelace1@example.com",
    "createdAt": "2026-02-18T10:25:12.000Z",
    "active": true
  }
]

The exact values change each run, but the structure follows your template.

Use realistic mock fields

The online generator supports common mock data placeholders:

  • {{name}}, {{firstName}}, {{lastName}}
  • {{email}}, {{username}}, {{phone}}
  • {{company}}, {{jobTitle}}, {{city}}, {{country}}
  • {{date}}, {{pastDate}}, {{futureDate}}, {{dateTime}}
  • {{uuid}}, {{id}}, {{index}}
  • {{integer(1,100)}}, {{number(0,100,2)}}, {{price(10,500)}}
  • {{boolean}}, {{word}}, {{sentence}}
  • {{choice(active,pending,blocked)}}

If a placeholder is the entire string value, numeric and boolean placeholders become real JSON numbers and booleans instead of strings.

Generate nested mock JSON data

Templates can include nested objects:

{
  "user": {
    "name": "{{name}}",
    "email": "{{email}}"
  },
  "profile": {
    "city": "{{city}}",
    "company": "{{company}}"
  }
}

That is useful for API responses, account profiles, app state, and structured test fixtures.

Repeat nested arrays

Nested arrays can use a _repeat marker:

{
  "id": "{{id}}",
  "orders": [
    {
      "_repeat": "{{repeat(1,3)}}",
      "orderId": "{{uuid}}",
      "total": "{{price(20,500)}}",
      "createdAt": "{{dateTime}}"
    }
  ]
}

Each generated record gets between one and three orders. The _repeat marker is removed from the output.

Why template-driven generation is better

Many mock data tools start with a form. That works for simple tables, but APIs usually have nested objects, arrays, and field names that must match your app.

Template-driven mock JSON generation lets you:

  • Match your real API response shape.
  • Generate nested data without manual cleanup.
  • Keep field names exactly as your app expects.
  • Reuse the same template for different record counts.
  • Create test fixtures without signup or server uploads.

Mock JSON without signup

Some mock data services limit large exports or require an account. For quick local development and test data, a client-side generator is simpler: paste a template, choose a count, generate, copy, and download.

For one-off data generation, use the JSON Generator. After generating output, you can inspect it with JSON Viewer, normalize key order with JSON Sort, or convert it with JSON to CSV and JSON to Excel.

Ready to merge your JSON?

Combine files or snippets in your browser — free and private.

Open the merge tool

Keep reading