JSON Schema → Example
Generate sample JSON documents from a JSON Schema using defaults, enums, formats, and property heuristics. · Updated
Options
Indent size:
json
json
Draft saved locally.
Options
| Option | Description |
|---|---|
| Indent size | Spaces used when pretty-printing the example JSON (0 for compact). |
FAQ
Which schema drafts are supported?
Heuristic generation works with common Draft-07 / 2020-12 shapes (type, properties, items, enum, format, default).
Are $ref references resolved?
Remote $ref is not fetched. Inline schemas and composition (anyOf/oneOf/allOf first branch) are preferred.
Can I validate the example afterward?
Yes. Use the companion JSON Schema Validator.
Why are some optional fields missing?
Large objects may omit non-required properties to keep examples readable.
Related tools
JSON Schema Validator
Validate JSON documents against JSON Schema definitions using Ajv. Path-accurate structural error reports.
JSON Formatter
Format, validate, and explore JSON with a collapsible tree view.
TypeScript to JSON Schema Converter
Convert TypeScript interfaces and type definitions directly to valid Draft-07 JSON Schema specifications.
JSON to TypeScript
Generate strongly typed TypeScript interfaces and type aliases from sample JSON documents instantly.