JSON Schema Validator

Validate JSON against Draft 7, 2019-09 or 2020-12 schemas in your browser. Review error paths and local $ref examples. No data or schema upload.

JSON Schema Validator

Validate JSON data against Draft 7, 2019-09 or 2020-12 in your browser.

Debug a nested validation error

Load a Draft 2019-09 schema with a local $ref and a wrong value type, then select Validate. This replaces both editors and resets the draft to Auto.

Browser-local validation. Your JSON data and schema are not sent to ToolMint servers. Remote $ref schemas are not fetched.

JSON Schema validates JSON data. It is different from Schema.org structured data used for search markup.

Validation settings

Auto detects a supported $schema declaration and otherwise uses Draft 2020-12.

Maximum 2 MB

Maximum 512 KB; local references only

Validation result

Ready to validate

Paste JSON data and a schema, then select Validate.

Steps

How to use

  1. Paste the JSON instance you want to test into JSON Data.
  2. Paste a self-contained JSON Schema into JSON Schema.
  3. Leave draft selection on Auto or explicitly choose Draft 7, 2019-09 or 2020-12.
  4. Select Validate and review the result, draft used and structured errors.
  5. Correct the data or schema, then validate again; copy the error summary when useful.
Examples and use cases
  • Check that an API response contains required string and numeric properties.
  • Validate an email, URI or date-time field using an enabled common format.
  • Test a Draft 2020-12 tuple that uses prefixItems.
  • Reuse a local address definition through #/$defs/address without a network request.
Privacy, limits and tool details

Key facts

Best use case
Checking API payloads, configuration objects and data contracts against a JSON Schema
Inputs
Pasted JSON instance data and a pasted JSON Schema
Supported drafts
Draft 7, Draft 2019-09 and Draft 2020-12
References
Same-document JSON Pointer, local definitions and supported local anchors; remote schemas are not fetched
Format checks
Common date, time, email, host, IP, URI, UUID and regular-expression formats
Processing method
Explicit browser-side parsing, schema compilation and validation
Privacy model
JSON, schema text and validation errors remain in browser memory and are not sent through analytics
Input limits
2 MB JSON data and 512 KB JSON Schema, with additional depth and node limits
Main limitation
External $ref documents and custom JSON Schema dialects are not loaded in this version
Privacy

Privacy and processing

Processing method: The browser parses both JSON inputs, checks structural limits and local references, then lazily loads a draft-specific Ajv validator and compiles the schema without sending a request to ToolMint or another host.

Privacy model: JSON data, schema text, identifiers, references, validation paths and values stay in browser memory. ToolMint does not save them to localStorage, upload them or include them in analytics.

Limitations

Limitations

  • Remote or relative external $ref documents are rejected; schemas must be self-contained in this version.
  • Draft 4, Draft 6, custom dialects and custom vocabularies are outside the supported first-version scope.
  • ToolMint enables a defined set of common formats through ajv-formats rather than asserting every possible custom format.
  • Resource limits reduce browser-freeze risk but cannot eliminate every pathological regular expression or combinatorial schema.
  • Validation checks JSON structure and constraints; application authorization and business rules still require application code.

Page freshness

Published
Sep 01, 2026
Last updated
Oct 04, 2026
Features

Benefits

Three current draft families

Test Draft 7, 2019-09 and 2020-12 through separate draft-aware validator environments.

Actionable errors

Review instance path, schema path, keyword and a concise message in deterministic order.

No remote schema fetch

Local references work without turning pasted schema content into a network request.

Private browser workflow

Instance data, schemas and validation errors remain in the current browser tab.

Tips

Pro tips

  • Include a canonical $schema declaration so Auto mode can select the intended draft.
  • Use local $defs for repeated rules and keep the schema self-contained.
  • Treat a valid schema result as one input check, not a substitute for permissions or business rules.
  • Keep regular expressions narrow and test them with representative data before production use.
Watch out

Common mistakes to avoid

  • Confusing valid JSON syntax with data that satisfies a JSON Schema.
  • Using Draft 2020-12 keywords such as prefixItems while explicitly selecting Draft 7.
  • Expecting an external $ref URL to be downloaded automatically.
  • Treating JSON Schema as the same system as Schema.org structured data for search engines.

Sources

Detailed JSON Schema Validator guide

What is the JSON Schema Validator?

ToolMint's JSON Schema Validator checks whether JSON instance data satisfies a user-supplied JSON Schema. Paste the data and schema, select a draft or use automatic detection, and the tool reports whether the instance is valid. When validation fails, each result identifies the instance path, schema path, keyword and message.

The validator supports JSON Schema Draft 7, Draft 2019-09 and Draft 2020-12. Validation happens in the current browser tab. ToolMint does not upload the JSON or schema, and it does not fetch external $ref documents.

JSON Schema is a data-validation system. It is different from Schema.org, which is a structured-data vocabulary commonly expressed as JSON-LD for search engines. The structured data and schema markup guide explains that separate SEO use case.

How to validate JSON against a schema

  1. Paste the instance you want to check into JSON Data.
  2. Paste a self-contained schema into JSON Schema.
  3. Keep the draft selector on Auto, or choose Draft 7, Draft 2019-09 or Draft 2020-12 explicitly.
  4. Select Validate.
  5. Review the result and correct each reported path or schema rule.

Auto mode reads a recognized root $schema declaration. If that declaration is absent, the tool uses Draft 2020-12 and displays a notice. If you explicitly select a different supported draft from the one declared in the schema, ToolMint validates with your selected draft and shows a mismatch warning rather than editing the schema.

Use Format JSON Data and Format Schema to apply two-space indentation. These actions parse and serialize the input with native JavaScript JSON methods; they do not preserve the original number text. For tree inspection, sorting and minification, use the dedicated JSON Formatter.

Numeric precision: both formatting and validation parse numbers as JavaScript Number values. Integers outside the safe range of -9,007,199,254,740,991 to 9,007,199,254,740,991 and high-precision decimals can lose precision. For example, formatting {"id":9007199254740993} produces {"id":9007199254740992} with indentation. Validation also uses the parsed value even when you do not select Format, so exact numeric constraints can produce misleading results for such inputs. See MDN's JSON.parse precision explanation.

Keep exact identifiers as quoted strings only when the data contract and schema define them as strings; changing a number to a string changes its type. When a contract requires exact large numbers or decimal arithmetic, use a validator with documented support for those values in the intended runtime. This tool does not provide arbitrary-precision numeric validation.

Debug a Draft 2019-09 local $ref error

Select Load failing $ref example above, then Validate. The button replaces both editors with a fictional order and a self-contained schema; Auto reads its Draft 2019-09 declaration. You can also paste the same inputs manually:

{"order":{"quantity":"2"}}
{
  "$schema": "https://json-schema.org/draft/2019-09/schema",
  "type": "object",
  "properties": {"order": {"$ref": "#/$defs/order"}},
  "required": ["order"],
  "$defs": {
    "order": {
      "type": "object",
      "properties": {"quantity": {"type": "integer", "minimum": 1}},
      "required": ["quantity"]
    }
  }
}

The data is valid JSON but fails the schema: /order/quantity is a string, while the referenced rule requires an integer. The result identifies the type keyword and the rule at #/$defs/order/properties/quantity/type. Change "2" to 2 in JSON Data and validate again; the corrected order passes. The local reference stays within the pasted schema and needs no download.

If you only need to select the quantity, use $.order.quantity in the JSONPath Tester. If you have sample rows but no schema contract, the JSON to TypeScript / Zod Generator can infer a starting shape; it cannot infer the minimum quantity rule from one example.

Supported JSON Schema drafts

Draft Notable behavior ToolMint support
Draft 7 Common in established APIs and schema libraries; uses definitions and dependencies Supported
Draft 2019-09 Adds vocabulary declarations, dependentRequired, dependentSchemas, unevaluatedProperties and recursive references Supported
Draft 2020-12 Current published draft; uses prefixItems, revised items behavior and dynamic references Supported and the default when $schema is absent

Each draft uses its corresponding Ajv validator environment. ToolMint does not pass every schema through one generic configuration because keyword meaning and reference behavior differ between drafts.

Draft 4 and Draft 6 are not included in this version. A schema declaring an unsupported or custom dialect produces an error rather than being silently interpreted as a different draft.

Draft 7 vs 2019-09 vs 2020-12

Draft 7 remains common and is often the right choice when maintaining an existing contract. Draft 2019-09 introduced vocabulary-based organization and split the older dependencies keyword into dependentRequired and dependentSchemas. It also added unevaluated-property and unevaluated-item behavior.

Draft 2020-12 changes tuple validation. Tuple entries move to prefixItems, while items applies to subsequent array entries. It also replaces the 2019-09 recursive-reference keywords with $dynamicRef and $dynamicAnchor. These changes are why selecting the correct dialect matters.

Do not change a schema's draft only to remove an error. First confirm which draft the producer and consumer expect, then update keywords deliberately if you are migrating the contract.

Supported validation keywords

The validator delegates JSON Schema semantics to Ajv. Supported keyword groups include:

  • Core object rules such as type, properties, required and additionalProperties
  • String rules such as minLength, maxLength, pattern and enabled format values
  • Numeric rules such as minimum, maximum, exclusive bounds and multipleOf
  • Array rules such as items, prefixItems where supported, minItems, maxItems, uniqueItems and contains
  • Object rules such as property counts, patternProperties, propertyNames and draft-specific dependency keywords
  • Composition with allOf, anyOf, oneOf and not
  • Conditional validation with if, then and else
  • Local definitions and references through $ref, $defs, definitions and supported anchors

Boolean schemas are also valid. A schema containing only true accepts every JSON instance. A schema containing only false rejects every JSON instance.

How ToolMint handles $ref

Same-document references are supported. A schema can reference #/$defs/address, #/definitions/address, a supported local anchor, or the root schema through #. Bounded recursive local references work where the selected draft and Ajv support them.

External references are rejected before schema compilation. ToolMint does not fetch references such as https://example.com/address.schema.json, ./address.json or file:///schemas/address.json. Use local definitions or combine the required schemas into one self-contained document.

An absolute $id is not rejected by itself. In JSON Schema, $id identifies a schema resource and does not necessarily instruct a validator to download it. ToolMint still performs no schema network request.

Validation errors explained

The tool distinguishes four failure types:

  • A JSON Data syntax error means the instance could not be parsed as JSON.
  • A JSON Schema syntax error means the schema text could not be parsed as JSON.
  • A schema compilation error means the parsed schema contains an invalid structure, unsupported dialect, unresolved local reference, invalid pattern or unknown format.
  • A validation error means both documents parsed and the schema compiled, but the instance did not satisfy one or more rules.

The instance path points to the failing location in the data. /user/email means the email member inside user; / means the root value. The schema path points to the rule that failed. The keyword identifies the rule, such as required, type, minimum or format.

At most 100 errors are displayed. The cap keeps a malformed payload or broad allErrors result from creating thousands of interface elements. Copying errors produces the same concise paths, keywords and messages shown on screen, without copying the original values.

Format validation

ToolMint enables common ajv-formats checks for date-time, date, time, email, hostname, ipv4, ipv6, uri, uri-reference, uuid and regex. It does not claim to validate every custom format name.

Format semantics vary by JSON Schema draft and vocabulary. Draft 2020-12 separates format annotation from format assertion. This implementation deliberately enables the listed checks, so a non-matching listed format produces a validation error. An unknown format is not silently presented as verified.

A format check confirms a value's syntax against the configured implementation. It does not prove that an email mailbox exists, a hostname resolves, a URI is safe to visit, or a date is appropriate for your business rule.

JSON syntax vs JSON Schema validation

JSON syntax describes whether text can be parsed into objects, arrays, strings, numbers, booleans or null. JSON Schema adds rules about the permitted structure and values. A payload can therefore be valid JSON while still failing its schema.

For example, {"age":"28"} is valid JSON. It fails a schema that requires age to be an integer because the value is a string. Use the guide to pretty-printing JSON or JSON Formatter when the immediate problem is syntax or readability. Use this validator when a data contract defines the expected shape.

The JSON tips guide covers syntax, numeric precision, safe parsing and the role of schema validation in a broader input-security process.

Practical uses

JSON Schema validation is useful when reviewing API requests and responses, webhook payloads, configuration files, data imports, event messages and contracts shared between teams. It can identify missing fields, wrong types, unexpected properties, invalid array items and values outside declared constraints before downstream code relies on them.

After validating a payload, use JSON to YAML Converter when another configuration system expects YAML, or YAML to JSON Converter for the reverse direction. JSON to XML Converter and XML to JSON Converter handle format conversion, while Text Diff Checker can compare two schema revisions as text.

Limits and resource safety

The JSON Data editor accepts up to 2 MB and the JSON Schema editor accepts up to 512 KB. Parsed instance data is limited to 100 nesting levels, 100,000 values and 20,000 items in one array. Schemas are limited to 80 nesting levels and 10,000 nodes. The tool also caps the number and length of pattern expressions.

These controls reduce browser resource risk from deeply nested inputs, very large uniqueItems arrays, recursive references, complex composition trees and regex-heavy schemas. They cannot prove that every user-supplied regular expression is safe from pathological execution. Keep patterns narrow, avoid unnecessary nested alternatives and test important schemas in the runtime that will enforce them in production.

Schema validation should not be the only application security boundary. Authorization, rate limits, output encoding, storage controls and business-specific checks remain the application's responsibility.

Privacy and local processing

Parsing, draft selection, schema compilation and validation run in the current browser tab. ToolMint does not upload JSON data, schema text, identifiers, references, errors, paths, property names or values. The tool does not save input to localStorage and does not send it through analytics.

Analytics, when permitted by your privacy preferences, receive only aggregate interaction details such as the selected draft, valid or invalid outcome and a coarse error-count range. Clearing or closing the tab removes the editor state.

Browse additional local converters and developer utilities in the Developer category.

Sources

The FAQ section below is generated from the ToolMint registry so visible answers and FAQ structured data remain synchronized.

Frequently asked questions

A JSON Schema validator checks whether JSON instance data satisfies the types, required properties, value constraints and other rules declared by a JSON Schema. It does more than check whether the JSON syntax parses.

Paste the instance into JSON Data, paste a self-contained schema into JSON Schema, choose Auto or a supported draft and select Validate. ToolMint then shows a valid result or structured errors.

ToolMint supports Draft 7, Draft 2019-09 and Draft 2020-12. Auto mode uses a recognized $schema declaration and defaults visibly to Draft 2020-12 when the declaration is absent.

Invalid JSON has a syntax problem such as a missing quote or trailing comma and cannot be parsed. A schema validation error means the JSON parsed successfully but did not satisfy a schema rule.

Yes. It supports same-document JSON Pointer references, local definitions and anchors that the selected draft and Ajv support. External document references are intentionally rejected.

No. HTTP, HTTPS, file and relative external $ref documents are not fetched. Paste a self-contained schema and use local definitions instead.

The instance path identifies the location in your JSON data that failed a rule. A root failure appears as /, while a nested failure may appear as /user/email.

JSON Schema defines rules for validating JSON data. Schema.org is a vocabulary often expressed as JSON-LD to describe web content for search engines and other consumers; this tool does not validate Schema.org markup.

No. Parsing, schema compilation and validation run in your browser. JSON data, schema text and errors are not sent to ToolMint servers or included in analytics.

ToolMint enables common ajv-formats checks for date-time, date, time, email, hostname, IPv4, IPv6, URI, URI reference, UUID and regular-expression strings. It does not claim to validate every custom format name.
8 min read Works in browser Privacy notes