JSON Schema Validator
Validate JSON data against a JSON Schema online with detailed errors, JSON paths, draft detection, and browser-based processing.
JSON Instance Data
How to Use
1. What is JSON Schema Validation?
JSON Schema is a declarative, vocabulary-based specification for annotating and validating JSON documents. A JSON Schema defines the allowable structure, mandatory keys, data types (string, number, boolean, object, array, null), semantic formats, and composition rules for data exchange.
A JSON Schema Validator executes an automated compliance check between a JSON document (instance) and its JSON Schema contract. If the instance satisfies every schema assertion, validation succeeds; otherwise, the validator outputs structured diagnostic errors pinpointing the exact property path, keyword constraint, and mismatch details.
{
"type": "object",
"required": ["name", "age"],
"properties": {
"name": { "type": "string" },
"age": { "type": "integer" }
}
}2. How to Use the JSON Schema Validator
Follow these simple steps to validate your JSON data or schema definition:
- Enter JSON Data: Paste your JSON payload into the left editor or click Upload JSON to load a local
.jsonfile. - Enter JSON Schema: Paste your schema definition into the right editor or choose from 13 realistic scenarios in the Load Example menu.
- Choose Mode: Select Validate JSON against Schema (default) or Validate Schema to test the schema definition itself.
- Select Draft: Leave on Auto Detect to infer dialect from
"$schema"or select a specific standard (Draft 2020-12, 2019-09, Draft-07, Draft-04). - Click Validate: Press Validate or use the keyboard shortcut Ctrl+Enter (or Cmd+Enter).
- Inspect Diagnostics: Review the Validation Summary dashboard for status, error counts, execution speed, and JSON structure metrics.
- Navigate to Lines: Click View in JSON or View in Schema on any error to highlight the exact source line in the editor.
- Copy or Download: Copy your formatted JSON, schema, or download the full diagnostic report.
3. Validation Modes: Instance vs. Schema Self-Validation
ToolMono supports two distinct operational modes via the top mode selector:
Mode A: Validate JSON against Schema
The primary workflow. Validates that the JSON instance data conforms to every structural, type, and semantic constraint declared in the JSON Schema.
Mode B: Validate Schema (Meta-Validation)
Validates the schema itself against the official JSON Schema meta-schema, catching misspelled keywords, invalid type declarations, and broken schema syntax.
4. Supported JSON Schema Drafts
ToolMono provides full, standards-compliant support for the following JSON Schema specifications:
| Draft / Version | Official $schema URI | Key Features |
|---|---|---|
| Draft 2020-12 | https://json-schema.org/draft/2020-12/schema | $defs, prefixItems (tuples), unevaluatedProperties, dynamic anchors |
| Draft 2019-09 | https://json-schema.org/draft/2019-09/schema | $defs, dependentRequired, recursive refs, unified vocabulary |
| Draft-07 | http://json-schema.org/draft-07/schema# | if/then/else conditionals, readOnly, writeOnly |
| Draft-04 / 06 | http://json-schema.org/draft-04/schema# | Legacy OpenAPI 2.0 / Swagger compatibility and core JSON pointers |
5. Core Validation Engine Capabilities
Sub-Millisecond Speed
Compiled AJV validation engine delivers sub-millisecond execution with real-time debounced live validation.
Line-Level Error Navigation
Click any diagnostic error to highlight the exact line and column in the JSON data or schema editor.
Format Checking
Full semantic format validation for email, uuid, uri, date, date-time, ipv4, ipv6, and regex patterns.
$ref & Composition
Resolves local reference pointers and handles composition rules (allOf, oneOf, anyOf, not).
100% In-Browser Privacy
All processing executes strictly in your browser memory. Zero network payloads or backend logging.
Exportable Reports
Copy or download machine-readable JSON validation reports with timestamps and metric breakdowns.
6. Step-by-Step Practical Example: API User Response
Consider an API user profile schema with required fields and format rules:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": ["id", "email", "age"],
"properties": {
"id": { "type": "string", "format": "uuid" },
"email": { "type": "string", "format": "email" },
"age": { "type": "integer", "minimum": 18 }
}
}When validating this invalid instance:
{
"id": "not-a-uuid",
"email": "jane.doe@example.com",
"age": "25"
}The validator returns two precise diagnostics:
$.id: must match format "uuid" (Keyword: format)$.age: must be integer (received string) (Keyword: type)
7. Common JSON Schema Validation Errors & Fixes
| Error Message | Root Cause | Recommended Fix |
|---|---|---|
| must be integer | Data contains a quoted string or float where an integer was expected. | Ensure the number is unquoted and has no fractional decimals. |
| Missing required property | An object is missing a mandatory key specified in required: [...]. | Add the property or mark it optional by removing it from the array. |
| Additional property is not allowed | Schema specifies additionalProperties: false and an undeclared key was present. | Declare the property in properties or remove the extra key. |
| must match format "email" | String does not satisfy standard RFC email format regex. | Provide a valid email address such as user@example.com. |
8. Real-World API, Webhook, and Config Use Cases
Verify REST and GraphQL payload contracts during integration and contract testing.
Validate incoming Stripe, GitHub, or Shopify webhook event schemas before processing.
Prevent deployment crashes by validating JSON settings and environment configs.
9. 100% Client-Side Privacy Guarantee
ToolMono evaluates all JSON documents and JSON Schemas entirely inside your web browser. No customer records, proprietary data structures, API tokens, or schemas are ever uploaded to remote servers.
10. Authoritative References & Standards
Consult official standards from the JSON Schema Organization and IETF:
JSON Schema Specification (Draft 2020-12)
Authoritative specification for the 2020-12 JSON Schema dialect.
JSON Schema Validation Specification (2020-12)
Standard validation keyword vocabulary reference.
AJV JSON Schema Validator Documentation
Official documentation for the AJV high-performance JSON schema validator.
Understanding JSON Schema Guide
Comprehensive official handbook on authoring schemas.
RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format
IETF standard for JSON grammar and parsing.
11. Frequently Asked Questions (20 FAQs)
Related Tools
Browse all toolsJSON Schema Generator
Instantly generate JSON Schema from any JSON payload. Supports Draft 7 and Draft 2020-12 with fast, browser-based processing.
JSON Formatter
Free online JSON formatter, beautifier, and validator. Format, indent, minify, and inspect JSON with real-time syntax error detection in your browser. 100% client-side.
JSON Transformer
Free online multi-engine JSON transformer. Filter, reshape, map, and restructure complex JSON payloads using JavaScript, jq, JSONPath, and Jolt specifications with 100% client-side Web Worker execution, live preview, and Monaco editors.
Free JSON Diff Checker
Compare two JSON files or objects online and find structural differences instantly. Detect added, removed, and modified values with nested key paths in your browser.
OpenAPI Validator
Validate, lint, and audit OpenAPI 3.2, 3.1, 3.0 and Swagger 2.0 specifications in JSON or YAML. Detect syntax errors, broken $ref pointers, path issues, security vulnerabilities, and API design warnings in your browser.
OpenAPI Diff Checker
Compare two OpenAPI or Swagger specifications online and detect breaking changes instantly. Compare endpoints, parameters, request bodies, response schemas, and security requirements in your browser.
OpenAPI Mock Generator
Generate realistic mock API responses from OpenAPI and Swagger specifications. Select an endpoint and response status, resolve schemas and $ref references, customize mock data, and export ready-to-use mock fixtures or server code entirely in your browser.
YAML to JSON Converter
Free online YAML to JSON converter. Instantly translate Kubernetes manifests, Docker Compose files, and GitHub Actions workflows to JSON with 100% client-side privacy, multi-document support, line-level error detection, anchors, aliases, and pretty/minified formatting.