JSON Schema compatibility check

Paste an old and a proposed JSON Schema to see which changes are safe for consumers, producers, or both.

Try:
Result

About the JSON Schema compatibility checker

Paste the schema your system accepts today and the schema you want to ship next. The checker compares common JSON Schema draft-7 validation keywords and reports whether the change is safe for:

The report is intentionally conservative. It proves straightforward type, enum, const, required-field, object-property, array-item, numeric-bound, string-bound, and additionalProperties changes; it emits warnings for composition keywords and regular-expression changes that require a full schema solver to prove. Everything runs locally in your browser.

Worked example: adding a required field

Old schema:

{"type":"object","required":["id"],"properties":{"id":{"type":"string"},"email":{"type":"string"}}}

New schema:

{"type":"object","required":["id","email"],"properties":{"id":{"type":"string"},"email":{"type":"string"}}}

Result: the new schema is breaking for consumers because old valid records could omit email. It is usually safe for producers because new records that include email still satisfy the old schema, unless your old consumers reject unknown or newly required fields in application code outside JSON Schema.

What the checker compares

Keyword familyExamplesDirection-aware behavior
Primitive typetype, enum, constNarrowing breaks consumers; widening breaks producers.
Object shaperequired, properties, additionalPropertiesAdded required fields and removed accepted properties are consumer risks; removed required fields and newly accepted properties are producer risks.
Numeric boundsminimum, exclusiveMinimum, maximum, exclusiveMaximum, multipleOfTighter ranges break consumers; wider ranges break producers.
String boundsminLength, maxLength, patternLength changes are classified; pattern edits are warnings unless unchanged.
Arraysitems, minItems, maxItems, uniqueItemsItem and size constraints are compared recursively where they are single-schema forms.
Metadatatitle, description, default, examplesIgnored because these do not change validation.

Limits and edge cases

FAQ

What is the difference between consumer and producer compatibility?

Consumer compatibility asks whether a reader upgraded to the new schema can still read old data. Producer compatibility asks whether data written for the new schema can still be read by systems that have not upgraded and still validate against the old schema. Tightening a schema usually threatens consumers; widening one usually threatens old producers or readers.

Is this the same as a formal JSON Schema subtype proof?

No. It is a practical keyword-level checker for the validation rules most teams change in API contracts and event schemas. Some JSON Schema features interact in ways that require a solver to prove exactly, so this tool emits warnings for those changes instead of pretending they are safe.

Why are regular expression changes warnings?

Determining whether one regular expression accepts a subset of another is much harder than comparing a numeric minimum or an enum set. A changed pattern may be safe, narrowing, or widening depending on the expressions. The checker points it out so a human can review it.

Can I use it for OpenAPI request and response schemas?

Yes, if you paste the actual JSON Schema object for the request body, response, or component you want to compare. For an OpenAPI operation, check inputs and outputs separately: request-body compatibility affects clients as producers; response compatibility affects clients as consumers.

Does it upload my schemas?

No. The comparison runs in WebAssembly in your browser, and the CLI uses the same local Rust code. External $ref URLs are not fetched; they are reported as warnings instead.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool json-schema-compat-check '{"type":"object","required":["id"],"properties":{"id":{"type":"string"}}}' 'new_schema={"type":"object","required":["id","email"],"properties":{"id":{"type":"string"},"email":{"type":"string"}}}'

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/json-schema-compat-check/?old_schema=%7B%22type%22%3A%22object%22%2C%22required%22%3A%5B%22id%22%5D%2C%22properties%22%3A%7B%22id%22%3A%7B%22type%22%3A%22string%22%7D%7D%7D&new_schema=%7B%22type%22%3A%22object%22%2C%22required%22%3A%5B%22id%22%2C%22email%22%5D%2C%22properties%22%3A%7B%22id%22%3A%7B%22type%22%3A%22string%22%7D%2C%22email%22%3A%7B%22type%22%3A%22string%22%7D%7D%7D&direction=both&strict_required=true

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.