Mock JSON Data Generator

Paste a JSON Schema or sample JSON and generate realistic fake test data — instantly.

Schema / Sample JSON

Mock Data

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 email gets a real-looking email, firstName gets a first name, createdAt gets 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.json or mock-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 namesWhat you get
format in a schemaemail, uuid, date-time, date, uri/urlan email, a UUID v4, an ISO timestamp, a date, an https address
contains emailemail, emailAddressfirst.last123@domain, lowercase, number 1–999
ends in id / uuid / guidid, userId, order_idan integer 1–100000 when the type is integer or number, otherwise a UUID v4
first / last namefirstName, last_namea first name (36 in the list) or a last name (30 in the list)
user nameusername, user_namefirst and last name joined, lowercase, with a number 1–999
name or full namename, fullNameFirst Last
phonephone, tel+1-NNN-NNN-NNNN
city, state, countrycity, province, countryone of 20 cities, 10 states or provinces, 10 countries
zip / postalzip, zipcode, postalCodefive digits
street / addressstreet, address1234 Maple St-style street address
companycompany, organizationa word and a suffix, such as Nexus Labs
avatar / image / photoavatar, photohttps://cdn.example.com/avatars/<uuid>.jpg
url / website / linkwebsite, urlhttps://name.com (also .io, .net, .dev)
colorcolor, colourone of 14 color names
exactly ipipan IPv4-style address
latitude / longitudelat, latitude, lon, long, longitudea number with six decimals in range
price and moneyprice, amount, cost, salary, total, balancea number 1–1000 with two decimals
exactly ageagean integer 18–90
datescreatedAt, updatedAt, date…, birthday, doban ISO timestamp from the last three years
textdescription, bio, summary, comment, note…, texttwo to four sentences of Latin-style placeholder text
starts with is or hasisActive, hasChildrentrue or false
anything else, by typestatus, count, scorestring: 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, allOf and $ref have no effect. A property that is defined with anyOf or through $ref or $defs (the Schema Generator can write these) comes out as null. Where type is 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 use crypto.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 userId in 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

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.