JSON Developer Tool
Infer a Draft-07 JSON Schema from a real JSON sample for validation, docs, and API contracts.
JSON Schema is used to validate API request/response bodies, document data contracts, and power form generation and IDE autocompletion. Writing one by hand is tedious — this tool infers a Draft-07 schema directly from a real JSON sample, so you get a solid starting point in seconds.
string, number, integer, boolean, null, object, and array, matched to JSON Schema's type system.properties and listed as required, since it appeared in the example.items schema; arrays with mixed item shapes get an anyOf of the distinct shapes.example value taken straight from your input, which is useful in generated API docs.
Because inference is based on one sample, treat the required list as a starting point: remove
any field you know is actually optional across other real payloads, and add constraints like
minimum, maxLength, or enum by hand where they matter.
jsonschema (Python), or similar libraries in other languages.New to JSON Schema? Start with Understanding JSON Schema: A Beginner's Guide.
$schema keyword. Draft-07 is widely supported by validators across most languages.required array for fields that are genuinely optional in your real data.format: "email" or format: "date-time", since that would risk being wrong. Add those manually where you know they apply.items describes the shape of the records inside it.