JSON Schema Generator — Draft 2020-12
Last updated: 2026-09-17
Paste a JSON object and get a JSON Schema (draft 2020-12) that validates it. The converter infers object types, string/number/integer/boolean/null, array item schemas, and required fields. Toggle additionalProperties to control whether extra keys are allowed. All processing is local.
Integer vs number
The converter distinguishes integers from floating-point numbers. A value of 42 produces {“type”: “integer”}, while 42.5 produces {“type”: “number”}. If a field might contain both, manually change the type to number after generation.
String formats
The converter does not infer string formats (date-time, email, uri, etc.). If your strings follow a known format, manually add the “format” keyword to the schema after generation for better validation.
Multiple samples
The schema is inferred from a single JSON sample. Fields that are optional in your data model but present in the sample will be marked as required. Review and adjust the required array after generation.