JSON Schema Bulk Sampler
Generate N sample records matching a JSON Schema, with seed control and optional field variation.
Overview
Paste a JSON Schema and the bulk sampler produces N example records that conform to it - each with realistic values for strings, numbers, dates, and enums. Seed control gives reproducible output; an optional "vary fields" toggle makes each record more distinctive rather than near-identical.
It's for developers seeding test databases, generating fixture data for end-to-end tests, or producing demo payloads for API documentation. Reach for it when you need a hundred plausible-looking users, or when a stakeholder asks for "show me what 50 of these would look like" before agreeing to a schema.
How it works
The sampler walks the JSON Schema (Draft 2020-12 by default, with fallback support for Draft 7) and synthesises values based on type and constraints: string honours minLength, maxLength, pattern, and format (email, uuid, date-time); number respects minimum, maximum, multipleOf; enum and const produce only their allowed values.
Output is deterministic for a given seed - reusing the same seed produces the same N records. The "vary fields" mode adds locale-aware variation (different names, addresses, dates) without violating the schema constraints.
Examples
- A simple user schema:
{ "type": "object", "properties": { "id": {"type": "string", "format": "uuid"}, "name": {"type": "string"}, "age": {"type": "integer", "minimum": 18, "maximum": 99} }, "required": ["id", "name"] } - Sample output (N=2):
[ {"id": "9c5f...", "name": "Alex Morgan", "age": 34}, {"id": "3a72...", "name": "Sam Reed", "age": 52} ] - Enum field:
{"type": "string", "enum": ["pending","paid","refunded"]} -> randomly picks one per record - Nested array of objects:
{"type": "array", "items": {"$ref": "#/$defs/Item"}, "minItems": 3}
FAQ
Does it honour $ref?
Yes - internal $ref and $defs references within the same document resolve correctly. External $ref URLs aren't fetched.
Are negative number constraints supported?
Yes - exclusiveMinimum, exclusiveMaximum, and multipleOf are all respected during number synthesis.
What about format keywords that aren't built in?
Standard formats (email, uuid, date, date-time, uri, ipv4, ipv6) produce realistic values. Custom or extended formats fall back to a generic string that matches pattern if present.
Will every output validate against the schema?
Yes - the sampler only emits values that satisfy the schema's constraints. If you hit a case where output fails validation, that's a bug worth reporting.