JSON Schema Validation — Enforce Structure
Instant JSON Validation and Transformation
Try the Validator
Paste your JSON payload on the left, attach a JSON Schema on the right, and hit Validate. The engine runs Draft 2020-12 ruleset against your data and surfaces every violation with line numbers, JSON pointers, and human-readable explanations — all in the browser, zero data leaves your machine.
Tool Demo
Validate, Transform, Ship
JSONForge's validator is built on the official ajv-2020 engine. It supports every keyword defined in JSON Schema Draft 2020-12 — including $dynamicRef, $anchor, prefixItems, contains, minContains, maxContains, and the full unevaluatedProperties / unevaluatedItems resolution pipeline. You can also load older schemas (Draft 7 through 2019-09) and the tool will auto-detect the $schema URI and apply the correct keyword set.
Beyond validation, the tool lets you attach a JSONata or JQ transform that fires only after a document passes schema checks — so you can normalise dates, flatten nested objects, or strip sensitive fields before handing the payload to downstream services. The transform step is optional; validation alone is enough to gate CI/CD pipelines or API contract tests.
JSON Schema Support
Draft 2020-12, End-to-End
Draft 2020-12 Keywords
Full support for $dynamicAnchor, $dynamicRef, $vocabulary, prefixItems, contains with minContains / maxContains, if/then/else conditional branching, and dependentSchemas. Meta-schema resolution uses the official https://json-schema.org/draft/2020-12/schema registry.
Custom Schema Authoring
Use the built-in schema editor to write or paste a schema from scratch. The editor provides syntax highlighting, bracket matching, and a live keyword palette. You can reference external schemas via $ref — the tool fetches them over HTTPS and caches them for the session. Schemas can be saved as named presets (e.g., "Stripe Webhook v3", "OpenTelemetry Span") and shared via a permalink.
Backward Compatibility
Schemas using Draft 7 (http://json-schema.org/draft-07/schema#), Draft 2019-09, or even the legacy Hyper-Schema profile are accepted. The engine auto-detects the $schema declaration and routes to the correct keyword resolver, so your existing schema library works without modification.
Error Reporting
Pinpoint Every Violation
When a document fails validation, JSONForge produces a structured error report that includes the JSON Pointer path to the offending value, the keyword that triggered the failure, the instance value, and a plain-English message. Errors are grouped by severity — fatal (schema-level mismatches like wrong type or missing required properties) appear first, followed by warnings (deprecated keywords, non-conforming but tolerated values).
Line & Column Mapping
Each error entry carries the exact line and column in the original JSON text, so you can jump directly to the problem in your editor. For example: "Line 14, Column 9: Expected object but found string at /orders/2/items — keyword type violated."
Machine-Readable Output
In addition to the visual report, you can export errors as a JSON array conforming to the JSON Schema validation results format, or as a JUnit-compatible XML file for CI dashboards. This makes it trivial to plug JSONForge into GitHub Actions, GitLab CI, or Jenkins pipelines.
Suggestion Engine
For common mistakes — missing closing braces, trailing commas, wrong types — the suggestion engine offers one-click fixes. It can auto-convert a string timestamp to an integer epoch, wrap a bare value in an array when type: "array" is expected, or strip unknown keys flagged by additionalProperties: false.
Whether you're validating a 200-byte API response or a 12 MB export file with 4,000 nested objects, the validator streams results incrementally so the UI never freezes. Large payloads are processed in Web Workers to keep the main thread responsive.