← Back to DevKit

Mock Data Generator

MOCK DATA · GENERATORS

Batch-generate test data from field templates — names, phone numbers, emails, dates, enums; one template line yields N JSON records.

Field template (JSON)
Generation settings
Rows
Supported field types
cnamenameemailphoneint(a,b)float(a,b,d)booldatedatetimeuuidenum(a|b|c)urlipcity
Chinese data (built-in sampled tables)
idcardcompanyregionaddressbankcard
This tool generates synthetic data for development and testing only — the ID and bank card numbers pass their check-digit algorithms but are not real credentials; never use them for identity or financial purposes.
Generated output · JSON array

>_ USAGE GUIDE

Batch-generate structured test data from field templates: more than ten field types including names, phone numbers, emails, dates, enum values, and auto-increment IDs. Define your fields in template lines, click once, and receive N records as a JSON array — no more hand-typing rows of fake users for a demo.

  1. Define the fields: one template line per field, picking a type for each
  2. Mix and match: combine "name + phone + signup date" to shape a realistic user record
  3. Choose the record count: generate the JSON array in one click
  4. Regenerate freely: not happy with the sample? Produce a fresh batch instantly

Use cases: front-end demos that need populated tables, test fixtures for API scripts, and sample data for spreadsheet screenshots. Generation runs locally in your browser and can be repeated as often as needed. Field templates can be kept alongside your test harness so the same shape is regenerated consistently whenever fixtures need a refresh.

>_ FAQ

Q1 · What is mock data, and why use it?

Mock data is fabricated data built to the expected structure before the real API or database exists. It lets front-end work start without waiting on the backend, keeps demos free of real user data, and gives test scripts controllable inputs. The core value is decoupling — the data structure stays independent of its source.

Q2 · Could generated names and phone numbers match real people?

Names are combined from common characters and phone numbers follow real numbering rules, so a coincidental match with a real person is possible. Before public demos or screenshots, add unmistakably fake markers: masked phone forms like 138****0000 and example.com email domains keep the data realistic while fully anonymized.

Q3 · How does this relate to libraries like Mock.js?

Mock.js is a code library wired into a project that intercepts requests and fabricates responses — the engineering-grade solution. This tool is one-shot generation without writing code: produce a static JSON batch, copy, done. High-automation projects should adopt the library; quick demos, prototypes, and spreadsheet tests are faster here.

Q4 · Can the output feed directly into API tests?

Yes — the output is a standard JSON array, usable as a request body, a test fixture, or a Postman import. When tests assert on specific field values, reproducibility matters: generate one batch, save it, and reuse it rather than regenerating fresh data each run, which would make flaky assertions impossible to debug.

Q5 · Are the generated ID and bank card numbers "real"? Why do they pass validation?

They are not real. idcard follows GB 11643: a 6-digit sampled region code + 8-digit birth date + 3-digit sequence + an ISO 7064 MOD 11-2 check digit; bankcard combines common BIN prefixes with a Luhn check digit. Both pass format validators — exactly what form-testing needs — but correspond to no real credential or account. The page carries a fixed warning: synthetic data for development and testing only, never for identity or financial purposes.

Embed code

Paste the code below into your page to embed this tool as an iframe (nav and footer auto-hidden).

Heightpx
This tool runs entirely in your browser — input never leaves your device. Press Ctrl K to switch tools anytime.