How to use the JSON Schema Validator
- 1. Paste the schemaYour JSON Schema, written to draft-07.
- 2. Paste the dataThe JSON you want to check.
- 3. ValidateSee valid, or a list of every error with where and why.
What a JSON Schema checks
A JSON Schema is a JSON document describing what valid data looks like. Teams use schemas to check API requests, configuration files and test data automatically. Common rules:
type: string, number, integer, boolean, object, array or null.required: keys that must be present.minLength,maxLength,pattern: rules for strings;formatfor emails, dates and URIs.minimum,maximum: limits for numbers.items,minItems: rules for arrays.additionalProperties: false: reject keys the schema does not list.
Validation runs with Ajv 6, one of the most widely used open-source JSON Schema validators, loaded from cdnjs and run in your browser.
Worked example
The sample schema needs a name of at least 2 characters, a valid email, an integer age of 18 or more, an array of string skills and no extra keys. The sample data breaks every rule, so the validator reports 5 errors:
.name: should NOT be shorter than 2 characters.email: should match format "email".age: should be >= 18.skills[1]: should be string (it is the number 42)- (root): should NOT have additional properties: city
Fix one at a time and validate again until you see ✅ Valid. Because all errors are collected at once (Ajv's allErrors option), you can fix everything in one pass instead of finding problems one by one.
Frequently asked questions
Which schema drafts are supported?
Draft-07 and earlier, the versions Ajv 6 supports. Newer drafts (2019-09, 2020-12) may use keywords this version does not know.
Is the email format check strict?
It checks a reasonable email shape. It cannot know whether the mailbox really exists.
Is my data uploaded?
No. The schema and data are checked in your browser.
Is the json schema validator free?
Yes, it is free. Your first validation asks for your name and WhatsApp number once, and after that the json schema validator and every other Uncodemy tool open without the form.