Validateur de Schéma JSON
Validate JSON data against a JSON Schema
100 % gratuit. Fonctionne entièrement dans votre navigateur : vos fichiers et données ne quittent jamais votre appareil et rien n'est envoyé à un serveur.
Enter a schema and JSON data above to see validation results.
À propos de cet outil
JSON on its own carries no rules. A field can be a string in one record and a number in the next, a required value can simply be absent, and nothing complains until something downstream breaks in a confusing way. JSON Schema adds those rules: this field must be a string, this one is required, this number must be positive, this array needs at least one item. Validating against it moves failures to the moment the data arrives rather than three systems later. The keywords doing most of the work are few - type, required, properties, and the constraints like minimum, maxLength and pattern. The one that surprises people is additionalProperties: by default a schema permits fields it never mentioned, so a payload with a misspelled key validates happily while the correctly spelled field is missing. Setting it to false is what turns a typo into an error. Validation runs in your browser.
Comment utiliser cet outil
- Paste your schemaThe rules the data must satisfy - types, required fields and constraints.
- Paste the JSON dataA real payload rather than an idealised one. Edge cases are where schemas earn their keep.
- Read the validation resultFailures are reported with the path to the offending field, so you know exactly where to look.
- Test the failing cases tooA schema that accepts everything is not validating anything. Confirm bad data is actually rejected.
Pourquoi l’utiliser
- Catches malformed data at the boundary rather than deep inside your application.
- Reports the path to each failure, so debugging is immediate.
- Runs in your browser - API payloads containing real data are never transmitted.
- Lets you develop a schema iteratively against real examples.
- No account and no size limit.
Usages courants
- Validating an API request or response against its contract.
- Checking a configuration file before deployment.
- Testing a schema you are writing against real sample data.
- Debugging why a payload is being rejected by a service.
- Documenting the expected shape of data for other developers.
Conseils pour de meilleurs résultats
- Set additionalProperties to false when you want typos caught. By default a schema silently allows fields it never declared.
- Test with invalid data as well as valid. A schema that passes everything gives false confidence.
- Use "required" explicitly - listing a field under properties does not make it mandatory, which is a very common misunderstanding.
- Note that type: "number" accepts decimals; use "integer" when you mean whole numbers only.
- If the JSON itself will not parse, fix that first with the JSON Formatter - a syntax error is not a schema failure.
Erreurs à éviter
- Assuming a field listed in properties is required. It is not - required is a separate array.
- Leaving additionalProperties at its default, so a misspelled key passes validation while the real field is missing.
- Using "number" where "integer" was meant, letting 3.7 through as a quantity.
- Only testing data you expect to pass, so the schema is never proven to reject anything.
- Writing a schema so strict it breaks on every legitimate future addition to the payload.
Questions fréquentes
It follows standard JSON Schema conventions covering the most commonly used validation keywords (types, required fields, patterns, ranges) - check specific advanced/newer draft features against your schema if you rely on less common keywords.
The tool reports which parts of the data violate the schema - such as a missing required field, wrong data type, or a value outside an allowed range - so you can pinpoint and fix the issue.
For this tool, yes. If you have sample data but no schema, the JSON Schema Generator produces one from it, which you can then tighten by hand.
Because additionalProperties defaults to true, so any field the schema does not mention is allowed. Set it to false and unexpected keys - including misspelled ones - become validation errors.
Listing a field under properties describes it but does not make it mandatory. Fields are only required when named in the separate "required" array - this catches almost everyone at least once.
No. Validation runs in your browser, which matters because the payloads people validate are usually real API traffic containing customer data.
Yes. JSON Schema Validator is free for normal use with no account required, and ToolBox does not add a watermark to your result.
Most tools in this category run in your browser so the file stays on your device. If a tool needs a temporary server job, files are handled for that job only and are not kept as a lasting archive.
Les gens recherchent aussi
- json schema validator online
- validate json against schema
- json schema required fields
- additionalproperties false
- json schema example
- json schema vs typescript types
- api contract validation