JSON Schema Sample Generator
Generate a valid example document from a JSON Schema, entirely in your browser.
Runs in your browser. Nothing is uploaded — your input is processed on this device and discarded when you close the tab.
JSON Schema Sample Generator
How to use this tool
- Paste a JSON Schema into the box. It must be valid JSON.
- Click Run to generate one sample document that follows the schema.
- Copy the result or load the sample schema to see how it works.
Worked example
Load the sample schema for a user record (name as a string, age as an integer with a minimum of 0, and a role chosen from an enum). The generated sample is {"name": "sample text", "age": 0, "role": "admin"} — age uses its minimum, and role uses the first enum value.
What this tool does not do / Limits
This tool generates one sample per schema; it does not validate a document against a schema (use JSON Schema Validator for that). Unresolved $ref references are shown as-is rather than expanded, because no external schema files are fetched. Complex keywords such as if/then/else and patternProperties are not used to shape the sample.
Frequently asked questions
Why is my sample missing an optional field?
All properties in the schema are included in the sample, required or not, so you can see the full shape. If a property is absent, check that it is inside the properties object of its schema.
Can it generate many different samples?
No — it generates one deterministic sample, so the same schema always gives the same output. That makes the output easy to test against your own code.
Related tools
JSON Studio
Format, validate, minify, query and compare JSON in your browser, with precise line-and-column errors.
LiveRegex Tester
Test patterns against sample text with match highlighting, capture groups and a safe one-second timeout.
LiveSecurity Header and DNS Checker
Check HSTS, CSP and other security headers, TLS details, and DNS/email authentication records (SPF, DKIM, DMARC).
Live