Schemas & MCPDraft 2020-12Strict Schema

Generate JSON Schema from JSON

Turn any JSON payload or JSONL sample into a spec-compliant JSON Schema — inferring formats (email, uuid, date-time) and optional fields across array samples.

100% Browser-Local — Verify 0 bytes uploaded in Network tabVerify 0 bytes sent in Network tabUpdated: 2026-11-24
  • 0 bytes uploaded
  • Draft 2020-12 & Draft-07
  • Multi-item type & format inference

Select JSON / JSONL

Draft 2020-12 & Draft-07 · inspects up to 100 array items.json · .jsonl

Zero upload limits · Runs in browser RAM

Benchmark & Expected Output

Draft 2020-12 & Draft-07

Before (Input)
{
  "orderId": "ORD-2026-01",
  "amount": 149.95,
  "currency": "USD",
  "paid": true,
  "items": [
    { "sku": "DATA-PRO", "qty": 2 }
  ]
}
After (Output)
Draft 2020-12 JSON Schema with inferred nested types & required keys
Source vs. target format specification comparison
PropertySource: JSONTarget: JSON Schema
File extension.json.schema.json
MIME typeapplication/jsonapplication/schema+json
Structure typeHierarchicalTyped Schema
EncodingUTF-8 TextUTF-8 Text
Nesting supportYesYes
LLM token efficiencyLowMedium
Schema / typedNoYes
Best forREST/GraphQL API payloads, nested web state, structured AI outputs, and universal cross-language interchange.Cross-language API payload contracts, OpenAI/Anthropic Structured Outputs, form validation, and AJV verification.
How it works

How to use JSON to JSON Schema locally in your browser

Infer Draft 2020-12 or Draft-07 JSON Schema with nested types, formats, required arrays, and strict additionalProperties locally.

01

Paste or drop JSON

Provide a representative JSON payload or JSONL sample.

02

Configure schema rules

Pick Draft 2020-12 or Draft-07, root title, required defaults, and additionalProperties.

03

Export .schema.json

Download the schema or convert straight to Zod v4, Pydantic v2, or OpenAI functions.

Next step

Continue your data pipeline

Related tools

Related data & AI tools

Format specs

Formats · Guides · Compare

FAQ

Frequently asked questions

How does it infer optional fields inside arrays?

The Unified Type IR merges up to 100 array items so keys missing on some elements automatically become optional.

Does it detect string formats like emails and UUIDs?

Yes. Sample strings matching email, UUID, URI, or ISO date-time automatically emit JSON Schema format annotations.

Can I convert the generated schema to Zod or TypeScript next?

Yes. Use the local pipeline shortcuts to send your schema straight into JSON Schema to Zod or TypeScript.