← All tools
JSON Schema Generator
Infer a JSON Schema (draft-07) from a sample JSON document. Paste any JSON — object, array, or primitive — and get back a schema with inferred types, nested properties, required keys, and array item schemas (unified across elements, with anyOf for mixed types and merged required sets for arrays of objects). The reverse of the JSON Schema validator. Everything runs in your browser; nothing is uploaded.
Inference rules: null → {"type":"null"}; integers → integer, other numbers → number; empty arrays → {"type":"array"} with no items; arrays merge element schemas (object properties are unioned, required = properties present in all elements); mixed types in an array become anyOf. Parsing and inference happen locally.