Generate sample JSON from a schema
Paste a JSON Schema or open a UTF-8 JSON file, then select Generate example. The tool builds a sample and checks it against your schema before showing it. Copy or download the JSON for API documentation, test fixtures, or development. Both steps run in your browser.
How the generator chooses values
The generator considers properties and constraints such as required fields, enums, array items, and common string formats. It tries values from examples or default when present, and can generate alternatives when those values fail validation. For example, when role allows only "admin" and "member", the result uses an allowed role. Run the generator again to try another combination.
Drafts and references
Use JSON Schema Draft 7 or 2020-12. A schema without $schema is treated as 2020-12. Use a local JSON Pointer to reference definitions in the same file, for example "$ref": "#/$defs/user". If the tool cannot find a matching example, try a simpler schema. A schema can be valid even when the generator cannot find a matching value.