Inference controls
Balanced defaults favor schemas that describe observed data without pretending the sample set is the whole future universe. Tighten only the dimensions you actually want to enforce.
Infer a production-ready schema from real JSON samples while preserving exact large integers, learning optional fields across records, extracting reusable definitions, and verifying the generated contract against the observed data before you use it.
Balanced defaults favor schemas that describe observed data without pretending the sample set is the whole future universe. Tighten only the dimensions you actually want to enforce.
Optional metadata is kept separate from structural inference so the generated contract is immediately usable in repositories, APIs and documentation systems.
The score reflects sample count, mixed types and sparsity. It is an inference aid, not a guarantee that future production data will match the sample set.
See what the generator actually observed before you promote the schema into a contract.
| JSON path | Observed types | Presence | Required | Distinct | Format | Inference notes |
|---|---|---|---|---|---|---|
| Generate a schema to populate the coverage map. | ||||||
A JSON Schema inferred from examples is always an observation, not prophecy. This tool is designed to expose that boundary instead of hiding it: every inferred required field, union, format and constraint can be traced back to sample coverage.
JavaScript normally rounds integers above 9,007,199,254,740,991. This parser keeps the original numeric lexeme, so identifiers such as 900719925474099312345 are still inferred as JSON Schema integer. Potentially lossy numeric bounds are deliberately omitted for those paths.
A property can only be proven required by examples when it appears in every observed object. The default is therefore 100% presence. Lower thresholds are available for contract design, but the compatibility indicator will explicitly show when that choice rejects an observed sample.
Small repeated value sets and observed length/range limits are tempting to encode, but they frequently overfit. Balanced mode leaves them open. Strict mode enables them and surfaces a review warning.
When identical object shapes occur in multiple places, the generator can extract them into $defs (or definitions for Draft-07) and replace the repeated structures with local $ref links.
Inference, file decoding, validation and export run in your browser. No conversion service is required. The tool does not infer business semantics, cross-field dependencies, conditional rules, regex patterns, database uniqueness, authorization rules or future values that never appear in the samples.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": { "type": "integer" },
"email": { "type": "string", "format": "email" }
},
"required": ["id"]
}