JSON Mock Generator

Generate fake records from a JSON Schema with format-aware values via Faker.

Supported formats: email, uuid, date, date-time, url, name, first-name, last-name, city, country, phone, company, ipv4.

[
  {
    "id": 372,
    "name": "Jannie Gleason",
    "email": "Josephine.Doyle21@gmail.com",
    "age": 46,
    "active": false,
    "tags": [
      "adimpleo",
      "demonstro",
      "tres"
    ],
    "address": {
      "city": "Thornton",
      "country": "Monaco"
    }
  },
  {
    "id": 665,
    "name": "Lavina Kovacek MD",
    "email": "Armando_Mueller93@hotmail.com",
    "age": 47,
    "active": false,
    "tags": [
      "curiositas",
      "impedit",
      "dapifer"
    ],
    "address": {
      "city": "Troy",
      "country": "Mayotte"
    }
  },
  {
    "id": 8,
    "name": "Damian Schroeder",
    "email": "Rolando.Beatty@yahoo.com",
    "age": 76,
    "active": true,
    "tags": [
      "officiis",
      "attero",
      "triumphus"
    ],
    "address": {
      "city": "Dexterberg",
      "country": "Morocco"
    }
  },
  {
    "id": 746,
    "name": "Laurence Corwin",
    "email": "Carol41@hotmail.com",
    "age": 39,
    "active": false,
    "tags": [
      "claudeo"
    ],
    "address": {
      "city": "Bashirianhaven",
      "country": "Sri Lanka"
    }
  },
  {
    "id": 194,
    "name": "Monserrate Hudson",
    "email": "Marilyn.Jaskolski@yahoo.com",
    "age": 78,
    "active": true,
    "tags": [
      "audio",
      "terebro"
    ],
    "address": {
      "city": "Robelfield",
      "country": "Argentina"
    }
  }
]

About JSON Mock Generator

JSON Mock Generator produces a realistic JSON document (or an array of them) that conforms to a JSON Schema you supply. Format keywords are honoured: `format: "email"` produces real-looking email addresses, `format: "date-time"` produces ISO timestamps within the last year, `format: "uuid"` produces v4 UUIDs. Faker is used for the underlying value generation, so names, addresses, and lorem text feel like plausible records rather than `string1`, `string2`, `string3`.

Reach for it whenever you need test data that matches a schema: seed a development database without writing a fixture script, populate a Storybook prop, drive a load test, or hand a frontend developer a sample so they can build a UI before the API exists. JSON Schema Generator is the inverse — given a sample, infer the schema. Mock Generator is the forward direction: given the schema, produce the sample. Faker is also available standalone via the Fake Data Generator for free-form mock data without a schema.

Examples

Input
{
  "type": "object",
  "properties": {
    "id": {"type": "string", "format": "uuid"},
    "email": {"type": "string", "format": "email"},
    "created_at": {"type": "string", "format": "date-time"}
  }
}
Output
{
  "id": "9f3c8a4e-72b1-4d22-9c8a-1f5b6e7d8e3a",
  "email": "ada.lovelace@example.com",
  "created_at": "2024-08-12T14:23:11Z"
}

Each format produces a realistic value via Faker. Re-run to get a different record; bulk-generate to get an array of N.

Frequently asked questions

How is this different from Fake Data Generator?

Fake Data Generator produces canned shapes (a person, an address, lorem ipsum) without a schema. Mock Generator is schema-driven: you supply the JSON Schema and the records match it, including the exact set of required fields. Use Fake Data when shape does not matter; use Mock Generator when the consumer expects a specific schema.

Which formats are supported?

The standard JSON Schema formats: `email`, `date-time`, `date`, `time`, `uri`, `uuid`, `ipv4`, `ipv6`, plus a handful of common extensions. Unknown formats fall back to a plain string of the appropriate `minLength`/`maxLength`.

Can I generate many records at once?

Yes. Set the count to N and the tool produces an array of N independent records. Each is generated separately, so values differ across records. Useful for seeding a list view or running a bulk import test.

Will it respect `enum` and `pattern`?

Yes. `enum` picks one value from the allowed list per record. `pattern` (a regex) drives a regex-based string generator that produces values matching the pattern. Complex patterns may produce slightly mechanical-looking strings; for those, consider replacing `pattern` with `format` for a nicer Faker-driven output.