Start a project

Tool 49 of 100 · Data

JSON Schema Validator

Paste a schema and some JSON and see exactly which values break which rules, with the JSON path to each one, or generate a schema from an example.

JSON Schema Validator at a glanceIllustration: 1, Schema + JSON; 2, processed in your browser; 3, Every error, with its path.JSON Schema Validator{ }1Schema + JSON3Every error, with its path2In yourbrowser
1 Schema + JSON 2 processed on your device 3 Every error, with its path

JSON Schema Validator

Schema

Draft 2020-12, 2019-09, 07, 06 or 04. Local $ref (#/$defs/…) is resolved.

JSON data

Result

WhereRuleProblem
Report
Result as JSON

01

What it does

Validates JSON against a JSON Schema with every error's path and reason, and can infer a starting schema from sample data.

  • Draft 2020-12, 2019-09, 07, 06 and 04 keywords
  • Local $ref and $defs resolved
  • if/then/else, allOf, anyOf, oneOf and not
  • Formats: email, date-time, uri, uuid, ipv4 and more

02

Private by design

Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

03

What you get

An error report and an inferred schema, with a Copy and a Download button on every result.

  • JSON Schema
  • Validation
  • API

Why it matters

A JSON Schema is the contract for an API or a config file: which keys must be there, what type each value is, and which values are allowed. Checking data against it catches bad requests before they reach your code and keeps front end and back end honest with each other.

Validator error messages are often cryptic. This one gives the JSON path of every failing value, the rule it broke and the value it expected, so you can fix the data or the schema in one pass. It runs entirely in your browser, so production payloads stay private.

How it works

  1. InputA JSON Schema and the JSON to check
  2. In your browserValidated with draft 2020-12 rules: $ref, allOf, formats
  3. OutputEach error with its path and rule, or a schema inferred from the data

Where it fits in a designer's workflow

  1. Plan
  2. Design
  3. Build
  4. Test
  5. Launch
Checking API payloads and config files before they ship.

By the numbers

Errors the validator finds in the sample orderformat at /email: 1 error; enum at /status: 1 error; minLength at /items/1/sku: 1 error; minimum at /items/1/qty: 1 error; additionalProperties at (root): 1 errorformat at /email1 errorenum at /status1 errorminLength at /items/1/sku1 errorminimum at /items/1/qty1 erroradditionalProperties at (root)1 error
Run with this tool's own validator on its sample schema and order: 5 errors, each with the path to the bad value and the schema rule it broke. The keywords are the standard JSON Schema 2020-12 ones. Source: JSON Schema 2020-12.
Show the numbers as a table
KeywordPath
format/email
enum/status
minLength/items/1/sku
minimum/items/1/qty
additionalProperties(root)

How to use it

  1. Paste your JSON Schema on the left.
  2. Paste the JSON you want to check on the right.
  3. Read the list of errors, each with its path and rule.
  4. No schema yet? Press 'Make a schema from the data' and tighten the result.

FAQ

Which drafts are supported?

The keywords of draft 2020-12, 2019-09, 07, 06 and 04. Set $schema to choose; without it, 2020-12 rules apply.

Does it fetch remote $ref URLs?

No. Only references inside the same schema (#/$defs/… or #/definitions/…) are resolved, so nothing is fetched.

Are formats enforced?

Yes. Common formats such as email, date-time, date, uri, uuid, ipv4 and ipv6 are checked, which many validators skip by default.

Is the inferred schema final?

It's a starting point: it marks every key it saw as required and guesses types. Add enums, patterns and limits yourself.

Work with me

Want a site that gets these right?

I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

All developer tools · Back to leej.uk