Infer a first-pass JSON Schema from a sample document, including common string formats.
The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.
Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.
The sample is parsed and visited recursively: strings get simple date, email, URI, UUID, or IPv4 hints; numbers become integer or number; objects become properties; and arrays infer one item schema or oneOf alternatives. Draft metadata and optional required lists are then added to the formatted document.
{
"name": "Alice",
"email": "[email protected]",
"age": 30,
"active": true
}
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string",
"format": "email"
},
"age": {
"type": "integer"
},
"active": {
"type": "boolean"
}
},
"required": [
"name",
"email",
"age",
"active"
]
}
API payloads, form generators, and fixture contract tests use inferred schemas as a starting point.