JSON Schema Sample Data Generator

Paste a JSON Schema and generate conforming sample JSON in your browser. Your schema stays on your device.

Your JSON Schema is parsed and turned into sample data locally in your browser and never uploaded, but avoid embedding real secrets or production values in the schema you paste.

Have JSON but need the schema? Try the JSON Schema Generator.

About JSON Schema Sample Data Generator

This JSON Schema sample data generator turns a schema into realistic sample JSON that actually conforms to it. Paste a draft-07, 2019-09, or 2020-12 schema and it builds data that respects your types, string formats like email, date, uri, and uuid, enum choices, required properties, minimum and maximum bounds, and combinators such as allOf, anyOf, and oneOf. Choose how many samples to produce and they are wrapped in an array, or generate a single object. Toggle realistic values to fill string formats with lifelike names, emails, and dates instead of plain placeholders. Use it to seed a database, mock an API response, or build fixtures for tests without hand-writing example payloads. The schema you paste is processed entirely in your browser and never leaves your device.

Features

How to use the JSON Schema Sample Data Generator

  1. Paste your JSON Schema into the schema box, or click Load example.
  2. Set how many samples you want and toggle realistic values on or off.
  3. Read the conforming sample JSON in the output panel on the right.
  4. Click Copy to grab the data, or download it as sample-data.json.

Example

Input

{
  "type": "object",
  "required": ["id", "email", "role"],
  "properties": {
    "id": { "type": "integer", "minimum": 1 },
    "email": { "type": "string", "format": "email" },
    "role": { "enum": ["admin", "editor", "viewer"] }
  }
}

Output

{
  "id": 254,
  "email": "ada@example.com",
  "role": "editor"
}

The integer, email format, and enum constraints are all satisfied in the generated object.

Common errors & troubleshooting

Frequently asked questions

Which JSON Schema drafts are supported?
It handles draft-07, 2019-09, and 2020-12 schemas, covering types, string formats, enums, required properties, numeric bounds, and combinators like allOf, anyOf, and oneOf.
How is this different from validating a JSON Schema?
Validation checks whether existing data matches a schema. This tool works in the opposite direction: it reads a schema and generates new sample data that conforms to it, so you can seed tests, mocks, or a database.
How do I generate an array of multiple records?
Set the Samples count above 1. Each sample is generated from the same schema and the results are wrapped in a JSON array; a count of 1 returns a single object instead.
What does the realistic values toggle do?
With it on, recognized string formats and fields are filled with lifelike names, emails, dates, and URLs. With it off, values are generated from the schema's own constraints and patterns.
Does the generated data always satisfy the schema?
The generator honors types, formats, enums, required fields, and numeric bounds. Very complex not or conditional if/then/else rules can be hard to satisfy exactly, so validate the output against your schema for critical fixtures.
Is my schema uploaded anywhere?
No. The schema you paste is parsed and generated entirely in your browser, so it is processed locally on your device and never sent to a server.

Related tools

All ArrayKit tools