JSON Mock Generator
Generate realistic sample JSON from a JSON Schema — seeded, deterministic, 100% local.
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.
{
"type": "object",
"required": ["id", "email", "active"],
"properties": {
"id": { "type": "integer" },
"email": { "type": "string", "format": "email" },
"name": { "type": "string" },
"active": { "type": "boolean" }
}
}{
"id": 54,
"email": "[email protected]",
"name": "calm record",
"active": true
}Supported Keywords
| Keyword | Effect | Notes |
|---|---|---|
| type | Selects the value generator | string, number, integer, boolean, null, object, array |
| format | Specialises string output | email, date, date-time, uri, uuid, hostname, ipv4 |
| enum | Picks a value from the list | Applied before type/format |
| minimum / maximum | Bounds for numbers and integers | Defaults: integer 1–100, number 0–100.0 |
| minLength / maxLength | Bounds for string length | Applied after format generation |
| minItems / maxItems | Bounds for array length | Default: 2–3 items |
| required | Always-included properties | Optional properties included ~80% of the time |
| properties | Object shape definition | Generates one value per property |
| items | Array element schema | Applied to each generated element |
| $ref | Local reference resolution | Supports #/$defs/... and #/definitions/... |
| anyOf / oneOf | Union schema | Picks the first schema in the list |
| allOf | Intersection schema | Merges 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 pattern | Generated value example |
|---|---|
| name, username, firstName, lastName | "Alice", "Bob", "Charlie" |
| "[email protected]" | |
| city, location | "London", "Tokyo", "Berlin" |
| id, userId, uid | Sequential integer: 1, 2, 3… |
| age | Integer in 18–65 |
| price, amount, cost, balance | Float with 2 decimals: 42.99 |
| url, href, link, website | "https://example.com/path/1" |
| description, bio, content, body | Short sentence: "A calm widget…" |
| createdAt, updatedAt, timestamp | "2024-03-15T10:30:00Z" |
| active, enabled, verified, published | Alternating 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.
Limitations
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."$ref": "https://example.com/schema.json" will throw an error. Only local refs in the form #/$defs/... or #/definitions/... are resolved.Try It
Frequently Asked Questions
Your files stay on your computer. Dad promised.