JSON Schema Faker screenshot

JSON Schema Faker

Generate a sample JSON document from a JSON Schema with a seeded generator: the same seed and schema always produce the same document.

Privacy First
0 Runs
Updated 2026-11-17
Runs in your browser
No sign-up, no upload

What the JSON Schema Faker does

The generator is a seeded 32-bit PRNG, not Math.random, and the seed is a control on the page. That is what makes the output reproducible across runs and reviewable in a diff.

Required and optional properties are both emitted: a fixture that omits optional keys exercises fewer code paths, and a schema's defaults are not visible in the output either way.

union keywords are refused: oneOf, anyOf, allOf, not, if and $ref are named and rejected rather than approximated. String pattern and format are not applied, so a generated string is not a valid email or date.

How to use it

Paste the schema into the JSON Schema box and set the Seed, or press Run with the example already there.

Read the Sample document below: every property the schema declares has a value of the declared type.

Press Run again with the same Seed to confirm the document does not change, then change the Seed to get a different one.

Worked example

Input:

{"type":"object","properties":{"id":{"type":"integer","minimum":1,"maximum":9},"ok":{"type":"boolean"}},"required":["id"]}

Output:

{
  "id": 6,
  "ok": false
}

Why it runs in your browser

The result is produced on this page with JavaScript, so it works offline after the page loads and nothing you enter is sent anywhere.

A deterministic sample document: the same schema and the same seed always produce the same JSON, so a fixture you commit does not churn.

Strings are lower-case letters, integers fall inside minimum..maximum, arrays honour minItems, and every property in the schema is present.

What it does, and what it does not

The generator is a seeded 32-bit PRNG, not Math.random, and the seed is a control on the page. That is what makes the output reproducible across runs and reviewable in a diff.

Required and optional properties are both emitted: a fixture that omits optional keys exercises fewer code paths, and a schema's defaults are not visible in the output either way.

union keywords are refused: `oneOf`, `anyOf`, `allOf`, `not`, `if` and `$ref` are named and rejected rather than approximated. String `pattern` and `format` are not applied, so a generated string is not a valid email or date.

How to use JSON Schema Faker

Paste the schema into the JSON Schema box and set the Seed, or press Run with the example already there.

Read the Sample document below: every property the schema declares has a value of the declared type.

Press Run again with the same Seed to confirm the document does not change, then change the Seed to get a different one.

What to Expect

Best for

  • Producing a fixture that matches a schema
  • Getting a deterministic sample for a test

Not ideal for

  • Generating a valid email or date, which needs format-aware generation
  • Schemas that use oneOf or $ref

What this tool keeps

  • The same document for the same seed
  • Every declared property present

What may need cleanup

  • A string is random letters, not a formatted value
  • A pattern or format constraint is not applied

Common errors

  • The page refuses it: uses oneOf, which this page does not model

Example use cases

  • Committing a fixture that will not churn
  • Smoke-testing a parser against a schema

Sample input

JSON Schema: {"type":"object","properties":{"id":{"type":"integer","minimum":1,"maximum":9},"ok":{"type":"boolean"}},"required":["id"]}

Sample output

Sample document: { …

Who this is for

  • Developers writing tests against a schema
  • Anyone needing a sample payload quickly

Frequently asked questions

Is the output random?

It is pseudorandom from the seed you set. The same schema and seed produce the same bytes, which is the property a fixture needs.

Why are optional properties included?

A sample that omits them exercises fewer code paths. The page emits every declared property, and your test can delete the ones it wants absent.

Why refuse oneOf?

There is no single honest sample for a union: any branch is valid, and picking one silently would make the output depend on an undocumented choice.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.