JSON Schema

JSON Schema Example Generator

Turn a JSON Schema into a readable sample payload for docs, mocks and tests. The generator is deterministic, browser-local and intentionally scoped to a safe MVP subset.

  • Schema stays in the browser
  • Seeded output
  • Local refs only

Sample payloads without a backend round trip

Validation tells you whether a payload is correct; an example generator helps teammates understand what a correct payload looks like. Paste or choose a JSON Schema, pick deterministic options and inspect the generated JSON plus the rules that shaped it.

The MVP does not upload schemas, does not resolve remote refs and does not execute user code. It supports a documented subset that is useful for API docs, fixtures and review conversations.

Generate sample JSON

Use presets or paste a schema. Defaults, examples, enums and local refs are handled before deterministic fallback values.

Example ready

Object fields, formats, enum values, tags and a local $defs address reference.

Input schema

Input chars
80000
Output chars
150000
Max depth
8

Generated JSON

Top type
object
Examples
1
Rules
12
Diagnostics
0
{
  "id": "47b55132-975b-4c86-a4c7-4b60a24f55f2",
  "email": "user7753@example.com",
  "role": "editor",
  "createdAt": "2026-01-01T08:55:00.000Z",
  "tags": [
    "beta",
    "beta"
  ],
  "address": {
    "city": "Warsaw",
    "country": "PL"
  }
}

Rules used

  • $objectGenerated 6 declared properties.
  • $.idformatUsed uuid format fallback.
  • $.emailformatUsed email format fallback.
  • $.roleenumSelected deterministic enum value.
  • $.createdAtformatUsed date-time format fallback.
  • $.tagsarrayGenerated 2 items.
  • $.tags[0]examplesUsed first JSON-compatible example.
  • $.tags[1]examplesUsed first JSON-compatible example.
  • $.address$refResolved local reference #/$defs/address.
  • $.addressobjectGenerated 2 declared properties.
  • $.address.citydefaultUsed default value.
  • $.address.countryconstUsed const value.

Diagnostics

No diagnostics for this run.

How this generator stays honest

A practical subset

The MVP covers common object, array, string, number, enum, const, default, examples, required and format cases. Unsupported keywords are reported as diagnostics instead of being silently promised.

Local refs only

Only #/$defs references are resolved, with depth and cycle guards. Remote refs are blocked so pasted schemas cannot trigger network resolution.

Generate, then validate

Use this page to create a readable payload, then open the Ajv validator when you need formal validation feedback against the same schema.

FAQ

Does the schema leave my browser?

No. The tool parses and generates examples in the browser runtime. There is no backend upload for pasted schemas.

Does it support every JSON Schema draft?

No. It supports a documented MVP subset for examples. Unsupported keywords produce diagnostics so the scope stays explicit.

How is this different from the Ajv validator?

The generator creates a sample payload. Ajv validates whether a payload satisfies a schema. They are complementary steps.

What does the seed do?

The seed makes fallback values deterministic. The same schema and options produce the same example, which is useful for docs and tests.

What happens with remote refs or oneOf?

Remote refs are blocked. oneOf and anyOf use the first supported branch and report a warning so the generated example is not mistaken for full schema coverage.