JSON Schema Validator & Generator Online Infer, validate, and mock data from JSON Schema.
100% offline
Input65 chars · 5 lines
Output362 chars
Schema inferred (draft-07)
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "email": {
      "type": "string",
      "format": "email"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "id",
    "email",
    "tags"
  ]
}

About JSON Schema Validator & Generator Online

JSON Schema describes the shape of a JSON document — its types, required keys, value ranges, and allowed formats — so tools can validate data and generate examples automatically. This free JSON Schema toolkit puts the whole lifecycle in one place: infer a schema from real JSON, validate a document against a schema with exact error paths, or mock realistic sample data from a schema.

The JSON Schema generator reads an example document and produces a draft-07 schema, detecting nested objects, array item types, and string formats like email, date-time, and URI. The validator reports every problem with a precise JSON Pointer path and a plain-English message, and the mock generator builds a sample instance that honors types, enums, and min/max bounds.

Everything runs entirely in your browser. No JSON you paste — schema or data — is ever uploaded, so it is safe for internal payloads and production samples.

Features

  • Infer a draft-07 JSON Schema from an example document
  • Validate JSON against a schema with exact JSON Pointer error paths
  • Generate plausible mock data from a schema, honoring enums and bounds
  • Detects email, date-time, date, UUID, and URI string formats
  • Fully offline — your JSON never leaves the browser

How to use

  1. Pick a mode: Infer, Validate, or Mock.
  2. For Infer or Mock, paste a JSON sample or a JSON Schema into the input pane.
  3. For Validate, paste the schema, add a line with only --- , then paste the document below it.
  4. Read the result and copy it from the output pane.

Frequently asked questions

What JSON Schema draft does the generator produce?

The Infer mode emits draft-07 by default, with the matching $schema URI. The validator supports a practical subset of keywords — type, required, properties, items, enum, minimum/maximum, minLength/maxLength, pattern, and additionalProperties — which covers the vast majority of real-world schemas.

How do I validate a document against a schema?

Switch to the Validate tab and paste the schema first, then a line containing only three dashes (---), then the JSON document below it. The output lists each error with its JSON Pointer path (for example /user/age) and a readable explanation, or confirms the document is valid.

Is the mock data realistic?

It is plausible and schema-valid rather than random fakery. The generator respects declared types, picks the first enum value, stays within minimum/maximum and length bounds, fills required object keys, and uses sensible placeholders for known string formats like email and date-time.

Does my JSON get uploaded anywhere?

No. Inferring, validating, and mocking all happen locally in your browser with hand-rolled logic and no third-party services. Your schemas and documents never leave your device.

Why does the inferred schema mark every key as required?

Inference works from a single example, so it assumes every key it sees is expected. Review the generated required array and remove any optional fields before using the schema for validation.

Everything runs locally in your browser — your input is never uploaded.