JSON Schema Validator and Generator

Features:

  • JSON Schema Validator Online: It checks JSON conforms to the definition described by a JSON Schema. It supports JSON Schema draft-07
  • JSON to JSON Schema Converter: It generates a JSON Schema from JSON.
  • JSON Schema to JSON Converter: It generates a sample JSON from JSON Schema (Pattern is not implemented yet).

Fill in the editors below and it will automatically validate that a JSON document conforms to the definition described by a JSON Schema.

If you want use the JSON schema generator or the JSON generator, please fill in only the desired editor and click the appropriate conversion button.


You can see the user guide to help you to use this online JSON schema checker.

JSON



Options for schema generation:

JSON SCHEMA



Options for json generation:






User guide

  • Validate JSON from Schema:

    Step 1: Fill "JSON" editor. You can Drag and drop a JSON file, click on "Browse a JSON file" or directly type in the editor.

    Step 2: It is analogous to step 1 ("JSON Schema" editor).

    Step 3: As soon as the editors are filled, the tool checks if the JSON conforms to the schema. If errors are detected then they are displayed below the editors, else a success message is displayed.

    JSON schema user guide

    This tool allows to quickly validate the compliance of your JSON document.

  • Generate a JSON example from a Schema:

    Step 1: Fill "JSON Schema" editor. You can Drag and drop a JSON file, click on "Browse a JSON file" or directly type in the editor.

    Step 2: You can choose the options (below the editor).
    If you check "Only required" then only the required fields will be filled in the generated JSON.

    Step 3: Click on "Generate JSON from Schema" button.

  • Generate a JSON Schema from a JSON document:

    Step 1: Fill "JSON" editor. You can Drag and drop a JSON file, click on "Browse a JSON file" or directly type in the editor.

    Step 2: You can choose the options (below the editor).
    If you check "required" then the fields will be mandatory in the schema.
    If you check "example" then the schema will contain exemples.

    Step 3: Click on "Generate Schema From JSON" button.


About JSON Schema Validator

This online JSON Schema Lint tool allows you to validate that your JSON document conforms to the specified schema. It uses the last release of JSON schema (draft-07).

To validate JSON from a Schema, it uses the ajv library. You can visit this website to learn more about this check.

It also allows you generate JSON and Schema (Not use external library).

What is JSON Schema?

JSON Schema is used to define how a JSON should be structured, it describes data format for complete structural validation.

This makes it easy to ensure that a JSON is properly formatted, it is useful for automated testing and validating.

JSON Schema provides clear human- and machine- readable documentation.

JSON Schema Example:

{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Tool",
    "description": "An online tool",
    "type": "object",
    "properties": {
        "id": {
            "description": "Tool identifier",
            "type": "integer"
        },
        "name": {
            "description": "Tool name",
            "type": "string"
        }
    },
    "required": ["id", "name"]
}

The JSON Object below conforms to above JSON Schema.

{
    "id": 1,
    "name": "XML diff"
}

Why validate the compliance of JSON data?

The JSON format has emerged in recent years, especially with the use of the REST APIs.

To develop quality Web services, it is important to test and validate JSON responses. This can quickly become difficult when there are many JSON responses to analyze.

JSON Schema can be a great tool to validate the JSON responses! Using the JSON schema can facilitate this validation!



You can report a bug or give feedback by adding a comment (below) or by clicking "Contact me" link (at the top right hand corner of the page).

Comments




Niels Muller Larsen-2018-09-24 04:56
Plain and simple. Just does it :)



Disclaimer: The tools are provided "as is", without warranty of any kind, either express or implied.
Any links to third-party website or software available on this website are provided "as is",
without warranty of any kind, either express or implied and are to be used at your own risk.