Paste your JSON data and get a valid JSON Schema instantly. Useful for API validation, documentation, and form generation.
JSON Schema is a vocabulary that allows you to describe the structure and validation rules for JSON data. It defines what properties an object should have, what types those properties should be, which properties are required, and what constraints apply to the values. JSON Schema is used for API documentation, request and response validation, form generation, and code generation.
A JSON Schema document is itself a JSON object. It uses keywords like type, properties, required, minimum, and maximum to describe the expected structure of the data. When you validate a JSON document against a schema you get a clear list of any violations which makes debugging API integrations much faster.
This tool takes a sample JSON document and infers a JSON Schema from it. It detects the type of each value, identifies nested objects and arrays, and generates a schema that would validate the input document. The output follows the JSON Schema Draft 7 specification which is widely supported by validation libraries in all major programming languages.
In .NET use the JsonSchema.Net package to validate requests against a schema. In JavaScript use the ajv library. In Python use jsonschema. In Java use the json-schema-validator library. All of these accept a JSON Schema document and a JSON value and return validation errors if the value does not match the schema.
This tool generates JSON Schema Draft 7 which is the most widely supported version. Draft 7 is supported by ajv, jsonschema, Json.NET, and most other validation libraries. Newer drafts like 2019-09 and 2020-12 add features but have less library support.
Yes. The generated schema marks all detected properties as required based on the sample input. You should review the schema and remove properties from the required array that are actually optional in your API.
Yes. Everything runs in your browser. Your JSON data is never sent to any server.