Json Schema Generator
Free online json schema generator tool, no installation required
About JSON Schema Generator
Infer a JSON Schema (draft-07) from a sample JSON document by walking its structure. The generator detects null, boolean, integer versus number, string, array, and object types; emits a $schema header; and lets you toggle strict mode and additional-properties handling. A detected root type is shown for reference.
How to Use
1. Paste a JSON sample into the JSON Input textarea. 2. Toggle Strict Mode to require minItems: 1 on arrays. 3. Toggle Allow Additional Props to control the additionalProperties flag on objects. 4. Click Generate. 5. Copy the schema from the Output Schema card.
Schema Inference Rules
Numbers are split into integer when Number.isInteger is true, otherwise number. Arrays infer their items schema from the first element only; in strict mode they also get minItems: 1. Objects list every key under properties and add every key to required; when Allow Additional Props is off, objects also get additionalProperties: false. The whole result is wrapped with $schema: http://json-schema.org/draft-07/schema#. The Root Type field shows one of null, array, object, string, number, boolean.
▶Which JSON Schema draft is produced?
▶How are arrays with mixed item types handled?
▶What does Strict Mode do?
▶Are all object keys marked required?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee