Skip to content
Input
Text
Limit
1 MiB
Runtime
Browser

Validate JSON against a Draft 2020-12 schema

Check types, required members, ranges, patterns, and other local JSON Schema constraints after both documents pass strict syntax parsing.

Local processingNo sign-upNo share URL

Validate against schema

Inputs are limited to 1 MiB and stay in this browser tab.

Paste or edit the source. Tool Swim does not upload or save it.

This second document is processed under the same local limits.

Schema validation result

Nothing is placed in a URL, account, or remote log.

What this tool does

Strict, bounded, local processing

The validator compiles Draft 2020-12 locally with all-error reporting. Remote `$ref` URLs are rejected so validation cannot fetch external content.

Schema validation begins after syntax succeeds

A JSON parser can confirm that a document represents an object, array, or primitive value. It cannot know that an API expects a positive integer named `toolCount`, that a status must come from an enum, or that unknown members should be rejected. JSON Schema expresses those constraints as another JSON document.

Tool Swim parses the instance and schema separately, validates the schema itself, compiles it with Ajv's Draft 2020-12 implementation, and reports all discovered instance errors. Each error includes an instance path, schema path, keyword, and bounded message without transmitting either document.

Remote references are intentionally disabled

JSON Schema can compose definitions with `$ref`. A remote URL would require a network fetch, introduce availability and trust questions, and weaken the page's local-only promise. This tool accepts local references inside the supplied schema but rejects HTTP and protocol-relative references before compilation.

For a production schema registry, pin immutable versions, authenticate access, cache safely, set resource and recursion limits, and define failure behavior when a dependency is unavailable. Bundle the complete schema graph when an offline or reproducible validation step is required.

A passing schema does not replace business authorization

Schema validation checks the described shape and constraints. It does not prove that an account id belongs to the caller, a referenced record exists, a price is allowed for a plan, or a transition is legal. Keep those checks in the server boundary that owns the data and identity.

Treat schema changes as interface changes. Version them, retain valid and invalid fixtures, test additionalProperties behavior, and review whether a widened type affects consumers. A browser result is a useful design check, not a substitute for automated contract tests.

Primary standards

Questions and answers

Related JSON tools

Related JSON guides