Skip to content

JSON Schema validator

Paste a document and a schema. A failure names the instance path and the schema path.

Remote $ref is not fetched. Inline the referenced schema. The document is not rewritten.

Ctrl+Enter or ⌘+Enter runs this tool immediately.

JSON document
JSON Schema

Waiting for input.

Parsing stays in this browser. Input is not uploaded or saved.

How to use this tool

  1. Paste the document on the left and the schema on the right, or load the sample.
  2. Read the panel. A mismatch lists the instance path, such as /port, and the schema path.
  3. The document stays as you pasted it when the check succeeds.

Supported formats and limitations

  • Draft-07 is used when $schema is absent or names draft-07. A $schema that names 2020-12 uses that draft.
  • Other draft identifiers are rejected.
  • A $ref to another URL is not fetched. The check stops instead of calling the network.
  • Invalid JSON on either side produces no validation result.
  • The document is not rewritten, completed, or coerced to match the schema.

Examples

A port that is a string

If port is declared as an integer, the text "8080" fails at /port.

{"name":"configkit","port":"8080"}

An extra key

additionalProperties false rejects a key the schema did not name.

{"name":"configkit","port":8080,"debug":true}

Common errors and solutions

must be integer
Change the value at the instance path, or change the schema type if a string is what you want.
Remote $ref
Paste the referenced schema into this schema. This page does not download it.
Unsupported $schema
Use draft-07 or 2020-12, or remove $schema to check the schema as draft-07.

FAQ

Which draft is used?
The $schema field selects draft-07 or 2020-12. If it is absent, the check uses draft-07.
Will a failed check repair the document?
No. The editor keeps your text, and the panel lists the paths that failed.
Is the document uploaded?
No. The schema and the document stay in your browser.

Related tools

  • JSON formatter

    Validate JSON, then pretty-print it with 2 or 4 spaces or minify it. Invalid JSON produces an error and leaves the output empty.

  • JSONPath tester

    Test a JSONPath expression against a JSON document in the browser. Script expressions are disabled, and a path that matches nothing returns an empty list.

  • JSON to CSV converter

    Convert a JSON array of objects or arrays to CSV in the browser. Nested values are rejected instead of being encoded.