Free JSON Schema Form Preview
See every field a JSON Schema defines, with its type, rules and required flag, and check real data against it field by field.
What is a JSON Schema Form Preview?
JSON Schema describes what a JSON document may contain: its fields, their types and the rules each value must follow. This tool turns a schema into the list of fields a form built from it would show, and checks JSON data against the schema field by field.
Validation runs on Ajv, the most widely used JavaScript JSON Schema validator, with ajv-formats for email, date-time, uri and other formats. The draft comes from the $schema keyword, and every broken rule is reported with a JSON Pointer to the exact value.
Key Features
Every Field as a Path
Nested objects and arrays flatten into paths such as address.zip and tags[], each with its type, required flag and rules. A long schema becomes a list you can scan in seconds.
Data Checked Field by Field
Add JSON data and each field is marked OK, Missing, Invalid or Not set, next to its value. You see which fields a submitted form got wrong.
All Problems, Not Just the First
Validate lists every failed rule with its JSON Pointer, from a missing required property to a bad email format. Fix them all in one pass.
Four Drafts Supported
Draft 2020-12, 2019-09, draft-07 and draft-06 are read from $schema, with draft-07 when none is given. The Draft stat shows which rules were applied.
Schemas and Payloads Stay Local
Ajv runs inside the browser tab, so internal API schemas and real request bodies aren’t uploaded.
Perfect for everyone
- Front-end developers building schema-driven forms
- API developers validating requests
- QA engineers testing edge cases
- Anyone writing or reviewing a JSON Schema
How to Use the JSON Schema Form Preview
Paste a schema, add data if you have it, and choose Form or Validate.
Paste the JSON Schema
Put the schema in the first box. Set $schema to pick a draft, or leave it out to use draft-07, and keep $ref targets inside the schema under $defs or definitions.
Add Data to Check
Paste a JSON document in the second box, such as a form submission or an API request body. It’s optional in Form mode and required in Validate mode.
Read the Fields in Form Mode
Each row shows a field path, its type, whether it’s required and its rules. With data present, the Value and Status columns show what was filled in and whether it passes.
List the Problems in Validate Mode
Validate gives a verdict and one line per broken rule, each starting with the JSON Pointer of the value. Fix the data or the schema, and the report updates as you type.
Schemas and Data, Checked
In each example the first line is the schema and the second, where present, is the data. The answer is the report this tool produced in the chip’s mode, so decide what passes before you reveal it.
“{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"},"age":{"type":"integer","minimum":13}}}”
“{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"},"age":{"type":"integer","minimum":13}}} {"age":12}”
“{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"},"age":{"type":"integer","minimum":13}}} {"email":"ada@example.com","age":36}”
“{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"},"age":{"type":"integer","minimum":13}}} {"email":"ada-at-example","age":12.5}”
“{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false} {"name":"Ada","nickname":"ada"}”
“{"type":"object","properties":{"tags":{"type":"array","items":{"type":"string"},"uniqueItems":true},"address":{"type":"object","properties":{"zip":{"type":"string","pattern":"^[0-9]{5}$"}}}}}”
“{"enum":["free","pro"]} "gold"”
“{"oneOf":[{"required":["card"]},{"required":["iban"]}]} {"card":"4242","iban":"DE89"}”
“{"type":"strin"}”
“{"$schema":"http://json-schema.org/draft-04/schema#","type":"object"}”
The JSON Schema Keywords Behind a Form
These keywords decide which fields a form shows and what each field accepts. Most schema bugs come from misreading one of them.
type
The basic shape of a value: string, number, integer, boolean, object, array or null. A list such as string and null together allows either.
“Does 12.0 pass type integer?”
required
Lists the property names that must be present, and it sits on the object, not on each property. Leave it out and every property is optional.
“Where does required go?”
properties and additionalProperties
properties describes the known keys, and additionalProperties set to false rejects any other key. Without it, unknown keys pass silently.
“Does an unknown key fail by default?”
enum and const
enum allows a fixed list of values and const exactly one. Values are compared as JSON, so the string "1" and the number 1 differ.
“Does the string "1" pass an enum of the numbers 1 and 2?”
minLength, maxLength and pattern
These constrain strings by length in Unicode characters and by regular expression. A pattern isn’t anchored, so add ^ and $ to match the whole value.
“Does the pattern [0-9]+ accept abc123?”
minimum, maximum and the Exclusive Pair
minimum and maximum include their limit, and exclusiveMinimum and exclusiveMaximum exclude it. In draft-04 the exclusive keywords were booleans, a common migration bug.
“Does 13 pass exclusiveMinimum 13?”
format
Named string formats such as email, date-time, uri, uuid and ipv4. Many validators only annotate format by default, while this tool enforces it with ajv-formats.
“Is format enforced by every validator?”
items and the Array Keywords
items describes every element, while minItems, maxItems and uniqueItems constrain the list. In 2020-12, schemas for fixed tuple positions moved to prefixItems.
“Which keyword holds tuple schemas in 2020-12?”
$ref and $defs
$ref points to a reusable schema, usually under $defs, or definitions in older drafts. A $ref back to itself describes recursive data such as a tree.
“Where do reusable schemas live in 2020-12?”
oneOf, anyOf and allOf
anyOf passes if any option matches, oneOf only if exactly one does, and allOf if all do. oneOf fails when two options both match, which surprises many authors.
“The data matches two oneOf options. Is it valid?”
JSON Schema Drafts and Where They’re Used
The $schema keyword names the draft, and each draft changed a few keywords. This is what each one means for your schema.
Draft 2020-12
The current release, used by OpenAPI 3.1 and most new projects. It replaced tuple-style items with prefixItems and added $dynamicRef.
Draft 2019-09
Introduced $defs, unevaluatedProperties and dependentRequired. Schemas written for it mostly work unchanged under 2020-12.
Draft-07
The most widely deployed draft, and the default here when $schema is missing. It added if, then and else, and many editors and config tools still use it.
Draft-06
Added const, contains and propertyNames, and turned exclusiveMinimum into a number. It’s supported here through Ajv’s draft-06 meta-schema.
Draft-04 and OpenAPI 3.0
Draft-04 isn’t supported, and OpenAPI 3.0 uses its own extended subset with nullable. Convert those schemas to draft-07 or later to check them here.
Forms Built From Schemas
Libraries such as react-jsonschema-form and JSON Forms build a form from the same keywords the Form view lists. By default their field order follows the properties order.
JSON Schema Mistakes to Avoid
These are the slips that let bad data through or reject good data.
required Belongs on the Parent
Writing required: true inside a property is draft-03 syntax and invalid in later drafts. List the names in the parent object’s required array instead.
Extra Keys Pass Unless Forbidden
Without additionalProperties set to false, a typo like emial is accepted silently. Add it to catch misspelled field names.
Patterns Match Anywhere
A digits-only pattern without ^ and $ accepts abc123xyz, because regular expressions aren’t anchored. Add ^ at the start and $ at the end for an exact match.
Format May Not Be Enforced
Many validators treat format as an annotation unless told otherwise, so a bad email passes. Turn format validation on in your own code, as this tool does.
oneOf Fails When Options Overlap
If two oneOf branches both accept the data, validation fails. Use anyOf, or make the branches exclusive with required or const.
Integer and Number Differ
type integer rejects 12.5, while number accepts it. Amounts stored in cents should be integer; measurements are usually number.
Defaults Don’t Fill Themselves In
default documents a value, but a validator doesn’t add it to the data. Form libraries use it to prefill a field, and your API has to apply it itself.
Remote $ref URLs Aren’t Fetched
This tool resolves references inside the pasted schema only. Copy the referenced schema under $defs to check it here.
When a Schema Preview Helps
Any time a schema decides what a form, an API or a config file accepts.
Previewing a Form Before You Build It
See every field, its type and whether it’s required before wiring the schema into a form library. A missing required list or a wrong type shows up at once.
Debugging an API Request
Paste the request schema and a rejected payload to see every rule it breaks, by JSON Pointer, instead of only the first error your server logged.
Checking a Config File
Editors, CI systems and Kubernetes tools publish JSON Schemas for their configs. Convert a YAML config to JSON and validate it against the published schema.
Writing a New Schema
Draft the schema in the first box and watch the field list grow. Invalid keywords and misspelled types are rejected with the path of the mistake.
Reviewing an OpenAPI 3.1 Component
OpenAPI 3.1 schemas are 2020-12 JSON Schema. Paste a component schema with $schema set to 2020-12 to see its fields and test an example.
Testing Edge Cases
Try boundary values such as an empty string, zero, a negative number or an extra key, and confirm the schema accepts and rejects what you intended.
Explaining a Schema to Your Team
The Form view turns nested JSON into a flat list of paths that product managers and QA can read. Copy it into a ticket or a test plan.