PDFFlare

JSON Schema Generator + Validator — Free Online

Free JSON Schema generator and validator — infer Draft-07 schema from a sample, or validate JSON against a schema with full error pointers. AJV-powered.

Two tools in one. Generate mode infers a Draft-07 JSON Schema from any sample — required fields, types, recursive structure, mixed-type arrays as anyOf. Validate mode runs your JSON against an existing schema using AJV (the industry-standard validator) and lists every violation with its path and the failed keyword.

Want TypeScript types instead? JSON to TypeScript generates interfaces from the same kind of input. Need to clean the sample first? JSON Formatter validates and pretty-prints.

Sample:0 lines · 0 B

How to Generate JSON Schema

  1. Pick a mode

    Generate creates a Draft-07 schema from a sample JSON. Validate checks any JSON against an existing schema and reports each error with its path.

  2. Paste your JSON

    For Generate, paste a representative sample. For Validate, paste both the JSON to check AND the schema to check it against.

  3. Click and read

    Generate emits the inferred schema in the right pane. Validate either confirms the data is valid (green banner) or lists every error with its path, keyword, and message.

When Do You Need a JSON Schema?

Validating user input: Reject malformed payloads before they touch your business logic. AJV with a JSON Schema is the de facto standard for Node.js validation.

OpenAPI specs: Every request and response in OpenAPI 3.x is described by a JSON Schema. Generate the body schema in one click instead of typing it.

Form generation: Tools like react-jsonschema-form render UI directly from a schema. Generate the schema from a sample of valid data, get a free admin form.

Contract testing: Snapshot a known-good API response as a schema, then assert every future response matches. Catches breaking changes automatically.

Why Use PDFFlare for JSON Schema?

Recursive Structure

Nested objects produce nested schemas. Required fields are declared at every level. Arrays infer item types.

Mixed-Type Arrays

Arrays of mixed types use `anyOf` — you get a faithful schema instead of a wrong-but-simple one.

100% Browser-Based

Sample data stays on your device. Safe for production payloads.

No Signup Required

No account, no rate limits. Open, paste, generate, copy.

Frequently Asked Questions About JSON Schema