{ }jsonkit
Format
Validate
Convert
Query
Generate
§→{}

JSON Schema Sample Data Generator Online

Create deterministic example JSON from a JSON Schema.
Array items
494 B · paste or drop a file
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
✓ complete494 B → 165 B0.0 ms

About Schema Sample Generator

The JSON Schema Sample Generator creates deterministic example data from a JSON Schema. It gives precedence to const, default, examples, example and enum values, then uses the declared type and familiar string formats to fill fields that have no explicit sample.

Generated data is useful for documentation drafts, UI fixtures, request examples and a quick visual check of a schema's shape. Local JSON Pointer references are resolved, nested objects and arrays are expanded, and the output is ordinary formatted JSON that you can copy into a test or API client.

A generated example is not proof that a schema is correct, and this lightweight generator is not a complete constraint solver. Complex regular expressions, conditional schemas and cross-field rules may require purpose-built test generation. Treat the output as a representative starting point and validate important fixtures with your production schema validator.

How it works

Prefer examples supplied by the schema author

Explicit const, default, examples, example and enum keywords take priority because they usually express the most meaningful sample. This keeps documented values intact instead of replacing them with generic placeholders.

Build objects, arrays and primitive values

Object properties are visited recursively, arrays receive the selected number of items, integers and numbers use a minimum when available, and booleans become true. Common formats produce recognizable UUID, email, URI, date and date-time samples.

Resolve local references and composition

References beginning with #/ are resolved within the pasted schema, with cycle protection for recursive definitions. The generator selects the first oneOf or anyOf branch and combines straightforward allOf object properties and required lists.

Limit output to required fields

Enable Required only when you want the smallest representative object. With the option disabled, both required and optional properties are included so the output documents the broader available shape.

Frequently asked questions

Which JSON Schema drafts are supported?

The generator understands commonly used keywords shared by modern drafts, including properties, items, prefixItems, required, $ref and composition keywords. It does not claim full draft-specific constraint solving.

Can it resolve external $ref URLs?

No. Only local JSON Pointers beginning with #/ are resolved. External files and URLs are not fetched, which keeps generation local and deterministic.

Will the generated value always pass schema validation?

Not for every advanced schema. Explicit examples may themselves be invalid, and patterns, conditionals, dependent schemas or overlapping composition rules can require a full constraint solver. Validate critical output separately.

How are recursive schemas handled?

The generator tracks active local references. When the same reference would recurse indefinitely, that branch becomes null so the page remains responsive and the surrounding shape is still visible.