Dad’s Data formats tools

JSON Mock Generator

Generate realistic sample JSON from a JSON Schema — seeded, deterministic, 100% local.

JSON Schema Input
Generated Mock JSON
Paste a JSON Schema to generate mock data.

How It Works

The generator reads your JSON Schema and walks its structure recursively. For each property it encounters, it generates a plausible value based on three signals, applied in priority order: the property's declared format, its declared type together with any constraints (minimum, maxItems, etc.), and finally a set of built-in key-name heuristics. A key named email always produces a valid-looking email address; a key named price always produces a float with two decimal places — even if the schema only says "type": "number".

Output is fully deterministic: the same schema and the same seed always produce the same JSON. Use the Regenerate button to increment the seed by one and get fresh values without leaving the tool.

Input
{
  "type": "object",
  "required": ["id", "email", "active"],
  "properties": {
    "id":     { "type": "integer" },
    "email":  { "type": "string", "format": "email" },
    "name":   { "type": "string" },
    "active": { "type": "boolean" }
  }
}
Output
{
  "id": 54,
  "email": "[email protected]",
  "name": "calm record",
  "active": true
}

Supported Keywords

KeywordEffectNotes
typeSelects the value generatorstring, number, integer, boolean, null, object, array
formatSpecialises string outputemail, date, date-time, uri, uuid, hostname, ipv4
enumPicks a value from the listApplied before type/format
minimum / maximumBounds for numbers and integersDefaults: integer 1–100, number 0–100.0
minLength / maxLengthBounds for string lengthApplied after format generation
minItems / maxItemsBounds for array lengthDefault: 2–3 items
requiredAlways-included propertiesOptional properties included ~80% of the time
propertiesObject shape definitionGenerates one value per property
itemsArray element schemaApplied to each generated element
$refLocal reference resolutionSupports #/$defs/... and #/definitions/...
anyOf / oneOfUnion schemaPicks the first schema in the list
allOfIntersection schemaMerges all schemas before generating

Key-Name Heuristics

When a property matches a well-known naming pattern, the generator produces a contextually appropriate value regardless of the schema type. This makes output immediately useful for UI development and testing without needing exhaustive format annotations.

Property name patternGenerated value example
name, username, firstName, lastName"Alice", "Bob", "Charlie"
email"[email protected]"
city, location"London", "Tokyo", "Berlin"
id, userId, uidSequential integer: 1, 2, 3…
ageInteger in 18–65
price, amount, cost, balanceFloat with 2 decimals: 42.99
url, href, link, website"https://example.com/path/1"
description, bio, content, bodyShort sentence: "A calm widget…"
createdAt, updatedAt, timestamp"2024-03-15T10:30:00Z"
active, enabled, verified, publishedAlternating true / false
role, type, status"admin", "user", "guest", "moderator"
tags, categories["alpha", "beta"]

Deterministic Output & Seeding

The generator uses a Linear Congruential Generator (LCG) seeded from the Seed field. A fixed seed guarantees identical output for the same schema — useful for snapshot tests, consistent demo data, and reproducible bug reports. Click Regenerate (or manually change the seed) to produce a different set of values without touching your schema.

Tip: Committed seed values make mock data reproducible across CI runs. Store the seed next to your schema fixture so the same fake dataset can always be regenerated.

Limitations

Warning: Complex regex patterns are best-effort. The pattern keyword is recognised but not structurally enforced — the generator produces a plausible generic string rather than one guaranteed to match the regex. For strict pattern compliance, post-validate the output with a JSON Schema validator.
Warning: External $ref values are not supported. References like "$ref": "https://example.com/schema.json" will throw an error. Only local refs in the form #/$defs/... or #/definitions/... are resolved.

Try It

Interactive — edit the input to see the output update
JSON Schema
Generated Mock

Frequently Asked Questions

Your files stay on your computer. Dad promised.

Data formats tools

Search the Data formats tools