Mock JSON Data Generator
Paste a JSON Schema or sample JSON and generate realistic fake test data — instantly.
Generate Realistic Mock JSON Data
Once you have a shape for your data — a JSON Schema from the Schema Generator, or just a sample response — the next thing you usually need is a batch of realistic-looking fake records to populate a UI, seed a database, or write tests against. This tool generates that data for you: paste a JSON Schema or a sample JSON object, choose how many rows you want, and get back properly shaped fake data with names, emails, IDs, and other fields that actually look real — not just repeated placeholder text.
How It Works
- Paste a JSON Schema or a sample JSON payload into the left editor, or click Sample to try an example schema.
- Set the row count (1–500) and click Generate — each row is generated fresh from the same shape. Changing the row count regenerates at once, and the output is always an array, even for one row.
- Field names drive realism: a field called
emailgets a real-looking email,firstNamegets a first name,createdAtgets a timestamp, and so on — not just a random string. - Switch to CSV if you need the output in a spreadsheet-friendly format instead of JSON.
- Copy or download the result directly into your project or test fixtures (
mock-data.jsonormock-data.csv).
Schema Input or Sample Input — Both Work
You can paste either a full JSON Schema (with type, properties, and
format keywords — exactly what the JSON Schema Generator
produces) or just a plain sample JSON object or array. When you paste a schema, declared
format values like email, uuid, and date-time are
honored directly. When you paste a sample, the tool infers the shape and uses each field's name and
original type to pick a realistic generator — so a numeric id stays a number instead of
turning into something else.
Two details are worth knowing. With a sample, only the shape and the types are used: your example values are never copied, so a sample
"version": "1.0" comes back as a random word and "page": 1 as a random integer. If a field must keep a fixed value, use a schema with
enum, which picks from the list (a one-item list gives that item every time). And a top-level array is treated as a list of one example:
the first element is the template for every row.
How a Field Gets Its Value
For each field the tool checks, in this order: a format keyword from the schema, then the field name against a list of patterns, and
finally the type. The name check ignores case and looks for the pattern anywhere in the name, and the first match wins. Every row of the table below was
run through the live tool, 300 values per field, and the values matched the description each time.
| Rule (first match wins) | Example field names | What you get |
|---|---|---|
format in a schema | email, uuid, date-time, date, uri/url | an email, a UUID v4, an ISO timestamp, a date, an https address |
contains email | email, emailAddress | first.last123@domain, lowercase, number 1–999 |
ends in id / uuid / guid | id, userId, order_id | an integer 1–100000 when the type is integer or number, otherwise a UUID v4 |
| first / last name | firstName, last_name | a first name (36 in the list) or a last name (30 in the list) |
| user name | username, user_name | first and last name joined, lowercase, with a number 1–999 |
name or full name | name, fullName | First Last |
| phone | phone, tel | +1-NNN-NNN-NNNN |
| city, state, country | city, province, country | one of 20 cities, 10 states or provinces, 10 countries |
| zip / postal | zip, zipcode, postalCode | five digits |
| street / address | street, address | 1234 Maple St-style street address |
| company | company, organization | a word and a suffix, such as Nexus Labs |
| avatar / image / photo | avatar, photo | https://cdn.example.com/avatars/<uuid>.jpg |
| url / website / link | website, url | https://name.com (also .io, .net, .dev) |
| color | color, colour | one of 14 color names |
exactly ip | ip | an IPv4-style address |
| latitude / longitude | lat, latitude, lon, long, longitude | a number with six decimals in range |
| price and money | price, amount, cost, salary, total, balance | a number 1–1000 with two decimals |
exactly age | age | an integer 18–90 |
| dates | createdAt, updatedAt, date…, birthday, dob | an ISO timestamp from the last three years |
| text | description, bio, summary, comment, note…, text | two to four sentences of Latin-style placeholder text |
starts with is or has | isActive, hasChildren | true or false |
| anything else, by type | status, count, score | string: one placeholder word; integer: 0–1000; number: 0–1000 with two decimals; boolean: true or false; unknown type: null |
Surprises from Name Matching
Because the first matching pattern wins and the match is a substring match, a few names behave in ways you might not expect. A field called
statement contains state and gets a state or province name. A field called ipAddress (or ip_address)
contains address, and the address rule comes before the IP rule, so it receives a street address; name the field plain ip
to get an IP-style value. lng is not recognised as a longitude (use lon, long or longitude), so it falls back to a
number from 0 to 1000. A field named age always gets 18–90, even if your schema says minimum: 0 and maximum: 5. When a field comes out wrong, rename it
or give it a format, or use enum to control the values exactly.
A Worked Example You Can Reproduce
Random data cannot be shown as exact output, but constants can. This schema gives status and plan a single-value
enum, leaves misc without a type, and nests a country. We pasted it into the live tool with 2 rows and ran it as JSON and as CSV:
Schema pasted (2 rows, JSON)
{
"type": "object",
"properties": {
"status": {
"enum": [
"active"
]
},
"plan": {
"enum": [
"free"
]
},
"misc": {},
"address": {
"type": "object",
"properties": {
"country": {
"enum": [
"Norway"
]
}
}
}
}
}Output, format JSON
[
{
"status": "active",
"plan": "free",
"misc": null,
"address": {
"country": "Norway"
}
},
{
"status": "active",
"plan": "free",
"misc": null,
"address": {
"country": "Norway"
}
}
]Same input, format CSV
status,plan,misc,address.country active,free,,Norway active,free,,Norway
Notice three things. The key order follows the schema. A field with no usable type, misc, becomes null in JSON and an empty cell in CSV.
And in CSV the nested address.country becomes a column called address.country: nested objects are flattened with dot notation. Arrays do not become columns;
each array is written into a single cell as JSON text with its quotes doubled, so a row with "tags":["a"] and a note containing a comma still opens as one record in a spreadsheet.
For a different input the header line was id,user.name,user.geo.lat,tags,note.
Arrays, Nesting and Row Counts
Each array in a schema or a sample gets one to three items per row, chosen at random, and each item is generated from the schema's items (or from the sample's
first element). Objects nest as deeply as your shape does. The row count is limited to 500 per batch: a larger number is lowered to 500 with a message, and an empty or zero
value becomes 1. For more data, generate several batches and merge them, for example with the JSON to CSV converter or a script.
Building a Realistic API Response
Start from a real response if you have one. Paste a single item, not the whole envelope: the tool repeats whatever you paste, so an envelope such as
{"data": [...], "page": 1} would be repeated in every row with its own random array. Generate rows for the item, then wrap the array in your envelope by hand
({"data": <rows>, "total": 20}). If you only have a few examples, the JSON Schema Generator can merge several samples into a
schema first, with nullable and optional fields described. Then use enum to pin the status values you care about, and name the fields so the generator recognises them:
createdAt for timestamps, email for contact addresses, price for money. Finally, run the output through the
JSON formatter or the JSONPath tester to check the paths your front-end code will use.
Using the Data with Other Tools
- Round trip: generate rows, then paste the array into the JSON Schema Generator, which merges all rows into one schema, to confirm the schema describes what you produce.
- Compare: use compare-json to see which keys changed between two versions of a fixture.
- Convert: turn the JSON into CSV or Excel with the JSON to CSV converter or the JSON to Excel converter if you need more control over delimiters, nested values and sheets than the built-in CSV.
- Validate: the JSON Schema validator can check rows against your schema, but remember the limits below: the generator follows the shape, not the constraints.
Limits of Fake Data
- Constraints are ignored.
required,minimum,maximum,minLength,pattern,uniqueItems,anyOf,oneOf,allOfand$refhave no effect. A property that is defined withanyOfor through$refor$defs(the Schema Generator can write these) comes out asnull. Wheretypeis a list, such as["string","null"], only the first type is used. - It is random every time. There is no seed, so you cannot reproduce a batch. Save the output if a test needs it again. The values come from
Math.random(), which is fine for fixtures and never suitable for secrets or tokens. UUIDs usecrypto.randomUUID()where the browser has it. - The pools are small. There are 36 first names, 30 last names and 8 email domains, so large batches will repeat names, and an email can repeat. UUID-based IDs are for practical purposes unique.
- It is not realistic everywhere. Phone numbers are in a US format, addresses are US-style, text is Latin placeholder text, and dates fall in the last three years. There is no locale option.
- No relationships. Two fields called
userIdin different places are unrelated, and nothing links a child row to a parent. - Do not email the addresses. The names and domains are invented, but the combinations (for example at gmail.com) can coincide with real people.
Privacy
All data generation happens entirely in your browser using JavaScript. Your schema or sample data — and the fake data generated from it — never leaves your device.
Mock Data Generator — Options Explained
Here's what drives the realism of the generated fields, and what each option on this page controls.
Field-Name Detection
Field names like email, phone, city, company, or price are matched against common naming patterns to pick a realistic generator, instead of producing generic placeholder text for every field.
Type-Aware Generation
The original value's type is respected — a numeric id stays a number, a boolean stays true/false, and nested objects and arrays are generated recursively, matching the structure you provided.
JSON Schema Formats
When you paste a JSON Schema, the format keyword (email, uuid, date, date-time, uri) is honored directly. Other formats, such as ipv4 or hostname, are not special and fall back to the field name and type.
JSON or CSV Output
Generate a JSON array for use directly in code or a test fixture, or switch to CSV for pasting into a spreadsheet or bulk-importing into a database tool. Nested objects are flattened into dot-notation columns in CSV mode.
Who Uses This Tool?
Frontend Developers
Populate a UI with realistic-looking data before the real API is ready, so tables, cards, and lists don't look empty or fake during development.
QA & Test Engineers
Generate a batch of test fixtures matching a schema, instead of hand-writing dozens of similar-looking JSON objects.
Backend Developers
Seed a development database with realistic sample rows, in JSON or CSV, matching the exact shape of a schema you're building against.
Product & Design Teams
Get believable sample content for mockups and prototypes instead of "Lorem ipsum" and "John Doe" repeated in every row.
Frequently Asked Questions
Does this use the Faker.js library?
No — this tool uses its own lightweight, hand-built data generator (name lists, email patterns, address data, and so on) rather than bundling the full Faker.js library, so the page stays small and fast while still producing realistic-looking fake data.
Can I use a JSON Schema from the Schema Generator?
Yes — paste the output of the JSON Schema Generator directly into this tool. Its type and format keywords are used to pick the right generator for each field automatically. Properties written with anyOf or $ref come out as null.
What if I paste a sample JSON object instead of a schema?
That works too. The tool infers each field's type from your sample value and uses the field name to pick a realistic generator, so you don't need a formal schema to get useful mock data. The values in your sample are not copied.
How many rows can I generate at once?
Up to 500 rows per batch. For larger datasets, generate in multiple batches and combine the output.
Is my schema or sample data uploaded anywhere?
No. All generation happens locally in your browser with JavaScript. Nothing is sent to a server.
How does the tool decide what a field contains?
In order: a format keyword in a schema, then the field name (matched in lowercase, anywhere in the name, first match wins, so email, firstName, city and price get matching values), then the type. A field with no recognisable name or type becomes null.
Is the generated data the same every time?
No. Every click on Generate produces new random values, and there is no seed to reproduce a batch. Download or copy the output if you need to keep it.
Does the generated data follow my schema's constraints?
It follows the structure, not the constraints. Keywords such as required, minimum, maximum, pattern, minLength and uniqueItems are ignored, and a field named age always gets 18–90. A property with enum picks one of its values.
Related Tools
- JSON Schema generator: generate a schema to drive the mock data.
- JSON Schema validator: validate the generated data against a schema.
- JSON to code generator: generate classes and types for Java, C#, PHP, TypeScript, Python and Go.
- JSON to CSV converter: flatten nested JSON into CSV with your choice of delimiter.
- JSON to Excel converter: write generated rows to an .xlsx workbook.
- UUID generator: generate random UUID v4 identifiers, in bulk.
- Compare two JSON documents: see added, removed and changed keys, with options to ignore array order and chosen keys.
- JSONPath tester: check the paths your code will use on the generated data.
- JSON formatter and fixer: validate, format and repair JSON before you use it here.
- all JSON tools: every free tool listed on one page.
Built by Deepak Kumar — a developer who wanted a JSON tool that respects your privacy. All processing happens in your browser. Your data never leaves your device.