format validator

JSON Schema Validator

Validate JSON Schema contracts with AJV, then test sample request or response JSON locally before you ship an API change.

Results

Paste input and validate locally.
Status
Ready when you validate.
Details
Ready when you validate.
Errors
Ready when you validate.

How to use this validator

  1. Paste the JSON Schema contract you want to test.
  2. Optionally paste a sample JSON payload that should match the contract.
  3. Run validation to compile the schema and validate the sample data.
  4. Read the AJV error path/message, then fix the schema or payload and re-run.
  5. Move production enforcement to strict AJV, OpenAPI tooling, or contract tests in CI once the quick browser check looks right.

Rules & checks

Compiles your pasted JSON Schema with AJV in the browser.

Validates optional sample JSON against the schema and reports field-level contract errors.

Checks structure rules such as required fields, property types, arrays, enums, formats, and nested objects when your schema defines them.

Runs locally on the page; schemas, sample payloads, and API examples are not uploaded, logged, or stored.

Uses flexible client-side validation for quick review; strict, draft-pinned, ref-aware CI validation should remain your production gate.

Inputs explained

  • JSON Schema

    Paste a valid JSON Schema object. Include required arrays, properties, enum, format, additionalProperties, or nested definitions you want AJV to enforce. Keep remote refs out of this quick validator.

  • Sample JSON (optional)

    Paste JSON to validate against the schema, such as a request body, response fixture, webhook event, feature flag config, or docs example. Leave it blank to check only that the schema compiles.

When to use it

  • Check API request and response fixtures before updating docs or SDK examples
  • Validate webhook event samples before handing them to customers or downstream teams
  • Debug AJV schema errors from CI without committing another trial change
  • Review feature flag, analytics event, or app config payloads before deploys
  • Preflight JSON Schema fragments generated from OpenAPI or contract-first workflows

Common errors

  • JSON syntax errors in the schema or sample payload before schema validation can run
  • properties defined as a string or array instead of an object
  • required fields omitted from the sample request or response
  • type mismatches such as number vs string, object vs array, or null where the schema does not allow it
  • enum values, format values, or nested array items that do not match the contract
  • schemas that depend on external $ref files or strict draft settings that this browser check does not resolve

Limitations

  • Strict mode is off here to make quick browser checks forgiving; production gates should use your chosen AJV strict settings.
  • Remote or multi-file $ref resolution is not fetched from the browser tool. Paste a self-contained schema or validate refs in CI.
  • Very large schemas or payloads can be slow in a tab; use backend or CI validation for big datasets.
  • JSON Schema confirms structure, not business logic, permissions, rate limits, or database constraints.
  • Format keywords depend on the AJV/browser configuration available to the tool; keep mission-critical format checks in your test suite.

Tips

  • Start with required and type rules before adding enum, pattern, format, or nested array constraints.
  • Use the JSON Validator first if the schema or payload may have syntax errors.
  • Prettify large pasted schemas before reviewing AJV error paths.
  • Keep this browser check self-contained; bundle external definitions before pasting or validate them in CI.
  • Pin the target draft and enable strict mode in your real build/test pipeline if schema behavior must be identical across environments.

Examples

API response matches required fields

  • Schema: { "type":"object","required":["id","email"],"properties":{"id":{"type":"integer"},"email":{"type":"string","format":"email"}} }
  • Data: { "id":42,"email":"ada@example.com" } -> Valid schema and data

Missing required property

  • Schema requires "id" and "email".
  • Data: { "email":"ada@example.com" } -> Validation error for missing required property: id

Wrong type in a config file

  • Schema says "retries" is an integer.
  • Data: { "retries":"3" } -> Validation error because the value is a string, not a number.

Invalid schema shape

  • Schema: { "type":"object","properties":"shouldBeObject" } -> Schema compile error because properties must be an object.

Deep dive

This JSON Schema validator is for contract checks, not just JSON syntax. It compiles your schema with AJV and can validate a pasted payload so you can catch missing required fields, wrong property types, enum mistakes, and nested object errors before an API or config change ships.

Because validation runs locally in the browser, you can review private examples, webhook payloads, or internal config snippets without uploading them. Use it for fast iteration, then keep strict AJV, OpenAPI, and contract-test validation in CI for production confidence.

FAQs

Is this different from a JSON validator?
Yes. A JSON validator checks whether the text is valid JSON syntax. A JSON Schema validator checks whether valid JSON follows a contract, such as required fields, allowed types, enum values, and nested object rules.
Is my schema or sample data uploaded?
No. The schema and sample JSON are processed locally in your browser and are not sent, logged, or stored.
Which JSON Schema drafts are supported?
The tool uses AJV for modern JSON Schema validation, but this browser check is intentionally flexible. For exact draft behavior, pin your draft and AJV options in CI or your application test suite.
Do you resolve external $ref files?
No. Keep schemas self-contained here. If your production schema depends on remote or multi-file refs, validate it with your build tooling, OpenAPI pipeline, or CI contract tests.
Can I validate API examples and webhooks?
Yes. Paste the schema, then paste a sample request, response, webhook event, or config payload. The result will show whether the sample matches the contract and where it fails.
Does this replace contract tests?
No. Use it as a fast local sanity check while editing schemas or examples. Keep strict AJV validation, contract tests, and ref-aware checks in CI for production releases.

Related validators

JSON Schemas and sample payloads stay in your browser. Nothing is uploaded, logged, stored, or shared, which makes the tool useful for private API examples and internal configs.

Client-side JSON Schema validation is a quick review aid. Production APIs should still enforce strict, draft-pinned, ref-aware validation and business rules in CI and backend services.