Paste a JSON Schema (draft-07, 2019-09 or 2020-12, or an OpenAPI component) and get realistic sample JSON that follows it: names, emails, dates, UUIDs and prices where the property names suggest them, values that match patterns and ranges, and as many documents as you need. A seed makes the output repeatable for tests and fixtures.
Last updated:
Data is generated in your browser from your schema. Nothing is uploaded, and the same seed always gives the same output.
Advertisement
Advertisement
How to use the JSON Schema Mock Data Generator
Paste your JSON Schema into the left box, open a .json file, or pick one of the examples.
Choose how many documents to generate and a seed. Shuffle picks a new seed.
Decide on optional properties: always include them, include about half, or only required ones.
Press Generate data (or leave Live update on) and check any notes under the panes.
Copy or download the result as JSON or NDJSON for fixtures, mock APIs or seed data.
How schema keywords shape the generated data
Keyword
Effect on the output
type
Chooses string, number, integer, boolean, null, array or object. With a list such as ["string","null"], null appears about one time in five.
enum / const
One of the listed values, or exactly the constant.
A random string matching the regular expression: classes, ranges, groups, alternation and quantifiers are supported.
minimum, maximum, multipleOf
Numbers inside the range; multipleOf 0.01 gives prices with two decimals.
minItems, maxItems, uniqueItems
Array length within bounds, without duplicates when unique items are required.
required
Required properties are always present; optional ones follow the Optional properties setting.
allOf
All subschemas are merged before generating.
oneOf / anyOf
One branch is picked at random for each value, so several documents show the different shapes.
$ref
Local references are followed; recursive structures stop after a few levels.
examples, default
Used as the value when "Use examples / default" is on.
Tips for better mock data
Name properties clearly.billingCity or unitPrice lead to more realistic values than field3.
Add examples for business-specific strings such as product names or plan codes; the generator rotates through them.
Use a fixed seed in tests so fixtures do not change between runs, and generate a larger batch with a new seed to look for edge cases.
Close the loop: generate a schema from a real response with the JSON Schema Generator, tighten it, create mock data here, then check samples with the JSON Schema Validator.
Frequently asked questions
What is a JSON Schema mock data generator?
It reads a JSON Schema, the document that describes what valid JSON looks like, and produces example JSON that satisfies it. Developers use it to create test fixtures, mock API responses, seed data and documentation examples without writing them by hand.
Which JSON Schema versions are supported?
The common keywords shared by draft-04, draft-06, draft-07, 2019-09 and 2020-12 work, including $defs and definitions, prefixItems and tuple-style items, and exclusiveMinimum as a number or boolean. OpenAPI 3.0 component schemas work too, including nullable and example.
Is the generated data guaranteed to be valid?
For the supported keywords the generator respects types, required properties, enums, ranges, lengths, item counts and patterns. Keywords such as not, if/then/else and external $ref files cannot be satisfied automatically, so they are listed in the notes. Check important fixtures with a JSON Schema validator.
What does the seed do?
The seed starts the random number generator. The same schema, options and seed always produce exactly the same documents, which keeps snapshot tests and shared examples stable. Change the seed or press Shuffle for new data.
How does it pick realistic values?
When a string has no format, pattern or enum, the property name is used as a hint: firstName gets a first name, email an address on example.com, zip a 5-digit code, createdAt a timestamp. Numbers named price, age, rating or quantity get sensible ranges unless the schema sets its own minimum and maximum.
Are the emails, phone numbers and URLs real?
No. Emails and URLs use the reserved example.com, example.org and example.net domains and phone numbers use the fictional 555 range, so the data is safe to use in tests and demos.
Can it follow $ref to other files?
Only references inside the same schema, such as #/$defs/address or #/definitions/Item. Remote or relative file references cannot be loaded in the browser; bundle the schema into one file first.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.