Formats in generated schemas are inferred from sample values, so review them.
Format data and Format schema use JSON.parse and JSON.stringify, which rewrites numbers such as 1.0 (to 1) and integers beyond 2^53. Validation itself also runs on parsed JavaScript numbers. Your JSON and schema never leave your browser; nothing you paste is uploaded.
Validation results
Schema warnings (0)
Results will appear here.
JSON Schema validation checks whether a JSON document follows rules written in a second JSON document, the schema: which keys must exist, what type each value has, which numbers or strings are allowed. Teams use it for API request and response contracts, configuration files, test assertions in CI, form payloads and OpenAPI components. Paste your data and schema above and every mismatch is listed with a readable path such as $.users[0].age. Your JSON and schema never leave your browser.
How do I validate JSON against a schema?
Paste your JSON data into the left box and your JSON Schema into the right box. Validation runs after you stop typing, or when you press Validate. A Valid result means the data matches the schema. Otherwise you get a list of errors, each with a readable path, the failing keyword and a plain-language message.
The draft is taken from the schema's $schema line. With none, Draft-07 is used and the result says so. The selector forces Draft-07, 2019-09 or 2020-12.
When developers validate JSON
Typical uses are checking a request or response against an API contract, catching configuration mistakes before a deploy, asserting in automated tests that a response keeps its shape, and screening form or webhook payloads before they reach business logic. If you do not have a schema yet, the JSON Schema Generator can draft one from a sample, and the JSON Formatter repairs data that fails to parse. To compare two payloads instead of checking one against rules, use Compare JSON.
How do I read the error paths?
Each error shows where the problem is in your data as a path starting at $, the root, such as $.users[0].age: the age of the first item in users. The keyword says which rule failed, for example type, required or minimum, and the parameters show the limit or the allowed values.
Hover a path, or tick Show raw pointers, to see the original JSON Pointer such as /users/0/age. Keys that are not simple names are quoted, like $["first name"]. Errors are sorted by path, and Jump to location selects the spot in your data. A required error points at the parent object, because a missing property has no position of its own.
Why does an external $ref not work?
This validator never fetches schemas from the network, so a $ref pointing to an http, https or file address cannot be resolved. That is deliberate: it keeps your schema and data private and results repeatable. Copy the referenced schema into your own under $defs and point to it with a local reference such as #/$defs/address.
A local reference that does not resolve, for example #/$defs/nope, gets a different message naming the reference, so you can tell a typo from a remote reference.
Why do I see schema warnings?
Ajv ignores keywords it does not know, so a typo such as requried would silently switch off a rule and every document would pass. The validator collects these cases in the collapsed Schema warnings list, for example unknown keyword "requried" is ignored. Check that list whenever a result is Valid but you expected errors.
Unknown format names, such as int64, are accepted without checking and listed there too.
Worked example: one schema, a passing document and a failing one
Every result below was copied from this validator, with the defaults.
JSON Schema validation: 2 errors (Draft-07, format checking on)
1. $.age [minimum] must be >= 0 (comparison: >= Β· limit: 0) pointer: /age
2. $.email [format] must match format "email" (format: email) pointer: /email
The age is below the minimum, and the email does not match the email format, so two errors are reported, each with its path.
How to use this validator
Add data and schema by pasting each into its box, or click Load valid sample or Load invalid sample to see both outcomes.
Pick a draft or leave Auto-detect on, which reads $schema and falls back to Draft-07.
Keep Validate formats on to check values such as emails, URIs and dates; switch it off to ignore format entirely.
Read the results: Valid, or a count of errors sorted by path. Use Jump to location on any row and Copy errors for a plain-text report.
Format data or Format schema to re-indent either box.
Large inputs: live validation pauses above about 1 MB, so press Validate. Anything slower than about 5 seconds is stopped with a clear message.
Can I generate a schema first, then validate with it?
Yes. The JSON Schema Generator drafts a schema from a sample and sends both documents here with one button. Treat the result as a starting point: the generator infers formats such as date-time or email from sample values, so review them. A date-time without a timezone offset, for example, passes the generator's guess but fails this validator's stricter format check. Our guide to JSON Schema explains the keywords, the Mock Data Generator can produce test records from a schema, and if an AI tool wrote your schema, see fixing AI-generated JSON.
Supported drafts and limitations
Draft-07, 2019-09 and 2020-12 are supported. Draft-04 and Draft-06 are not, and a schema that declares them gets a clear message.
External references are never fetched, for privacy. Inline them under $defs.
Unknown keywords produce warnings and are ignored.
Numbers are parsed as JavaScript numbers, so integers beyond 2^53 lose precision and 1.0 reads as 1.
The list of known formats comes from ajv-formats.
Jump to location works while the data is unchanged since the last validation.
Is my JSON uploaded anywhere?
No. Your JSON and schema never leave your browser, and nothing you paste is uploaded. Parsing and validation run in a background worker on your device, using a copy of the open-source Ajv library served from this site. The page uses Google Analytics only to count visits and button clicks, never your data.
Frequently Asked Questions
What is a JSON Schema validator?
A JSON Schema validator checks whether a JSON document follows the rules in a JSON Schema, such as required keys, value types, ranges and formats. It reports every mismatch with its path, so you can fix the data or tighten the schema before it reaches production.
Which drafts are supported?
Draft-07, 2019-09 and 2020-12 are supported, chosen automatically from the schema's $schema line or with the draft selector. Draft-04 and Draft-06 are not supported, and a schema that declares one of them gets a clear message instead of a confusing error.
How do I read the error paths?
Paths start at $ for the root, so $.users[0].age means the age of the first item in users. The keyword names the rule that failed, such as type or required, and the parameters show the limit or allowed values. Hover a path to see the raw JSON Pointer.
Why does external $ref not work?
The validator never loads anything from the network, so $ref values pointing to http, https or file addresses cannot be resolved. Inline the referenced schema under $defs and use a local reference like #/$defs/address, which keeps your schema private and results repeatable.
Is my data uploaded anywhere?
No. Your JSON and schema never leave your browser, and nothing you paste is uploaded. Validation runs in a background worker on your device with a local copy of an open-source library. The page only sends anonymous page-view and button-click analytics that do not include your data.
Built by Deepak Kumar β a developer who wanted a JSON tool that respects your privacy. Your JSON and schema never leave your browser, and nothing you paste is uploaded.