Paste one valid JSON value to infer its current shape.
Select dialect-neutral output or add the Draft 7 declaration for an explicit schema dialect.
Paste one valid JSON value to infer its current shape.
Select dialect-neutral output or add the Draft 7 declaration for an explicit schema dialect.
JSON Schema generation guide
Paste one valid JSON value into the generator above to infer a schema for its current structure. VetaTool identifies objects, arrays, required properties, and primitive JSON types locally in your browser, then produces readable JSON Schema output for review.
Objects become schemas with properties and required keys based on the fields present in the sample. Numbers are separated into integer and number types, while strings, booleans, null values, arrays, and nested objects are inferred recursively.
Arrays with one repeated shape use a single items schema. Arrays containing distinct shapes use a deduplicated anyOf list so the generator does not silently discard observed item types.
One payload cannot prove whether a field is always required, whether a string is an email, or whether additional object properties should be rejected. The generated result is therefore a starting point rather than a complete application contract.
Dialect-neutral output keeps the conservative shared subset without a $schema declaration. Draft 7 output adds http://json-schema.org/draft-07/schema# while preserving the same sample inference rules.
Generation runs locally in the browser, so API samples and configuration data are not sent to a schema service.
The generator infers required object properties, an integer identifier, a string name, and homogeneous string array items.
{
"id": 1,
"name": "Ada",
"tags": ["admin", "editor"]
}{
"type": "object",
"properties": {
"id": { "type": "integer" },
"name": { "type": "string" },
"tags": {
"type": "array",
"items": { "type": "string" }
}
},
"required": ["id", "name", "tags"]
}Common questions
You can keep dialect-neutral output or select Draft 7. Draft 7 adds the official $schema declaration; Draft 2020-12 remains a separate follow-up capability.
The generator currently receives one sample. Every field present in that object is marked required because the sample provides no evidence that the field is optional.
Distinct observed item schemas are deduplicated and placed under items.anyOf. Repeated values with the same inferred shape produce one shared items schema.
No. The initial generator treats those values as strings rather than guessing semantic formats from one example.
No. Parsing and schema inference run locally in your browser.