Skip to content
Dev Tools2026-07-166 min read

Mock Data Generator Complete Guide: Generate Test Data Fast

Why You Need a Mock Data Generator

Integration work, UI debugging, demos, and light load checks all need rows of test data. Hand-writing them is slow, repetitive, and often mismatched with real field shapes.

The Mock Data Generator builds multi-row fake datasets from field types you select. Rename columns, pick a locale, set an optional seed, and export JSON, CSV, TSV, YAML, or SQL — all in the browser, nothing uploaded.

Common pain points

  • Backend APIs are not ready, so the frontend cannot integrate — generate a matching batch first
  • Tests need many field types; after generation, sanity-check JSON with the JSON formatter
  • Demo data looks fake and weakens the presentation
  • Hundreds of rows for scroll or import drills are unrealistic to type by hand

What the tool provides

Field types

Thirty-two field types across seven categories:

CategoryExamplesTypical use
BasicChinese/English names, gender, age, boolean, username, phone, email, ID card, address, companyUser tables, profiles
NetworkIPv4/IPv6, URL, domain, User-AgentLogs, gateway stubs
Date & timeRandom / past / future dates, timestampsSorting and filters
NumbersInteger, float, percentageCharts and reports
TextRandom string, Lorem, Chinese fillerList titles and body copy
IdentifiersUUID/GUID, order number, bank cardPrimary keys, payment demos
ColorHEX, RGBUI placeholders

When you only need structure and not meaningful fields, the lighter JSON generator is enough. Prefer this tool for emails, phones, names, and similar typed columns.

Locale samples

Locale reshapes phone, address, company, and gender labels:

  • Chinese / CN: 11-digit mobile prefixes, province/street addresses, Chinese gender labels
  • English / US: +1 (area) xxx-xxxx phones, US city streets and ZIP-style codes, English company and gender wording

Chinese and English name types stay independently selectable, so you can mix bilingual UI cases (for example English locale with Chinese names).

Seeds for reproducible fixtures

Leave the seed empty for fresh randomness. Set any string (for example fixture-users-v1) and keep fields, row count, locale, and format unchanged to regenerate the same output. That helps with:

  • Frontend golden / snapshot tests
  • Stable samples in pull requests
  • Copy-paste examples in docs and tutorials

Changing column names or row count with the same seed changes the result — the seed covers the whole generation request, not a single field.

Export formats

FormatGood for
JSONMock servers, frontend fixtures, then JSON to TypeScript
CSV / TSVSpreadsheets and pipelines; convert with CSV↔JSON
YAMLConfig-style mocks and some CI fixtures
SQLINSERT INTO mock_data (...) VALUES ... — rename the table before loading

Row count is capped at 1–1000. Validate column shapes on a small batch before scaling up.

Scenarios

Parallel frontend work

  1. Select fields and rename columns to match the API (userId, createdAt, …)
  2. Set a seed when you need reproducibility, export JSON
  3. Point the UI at the local mock; switch the data source when the API lands

List layout and edge feel

Mix long text types (Lorem, Chinese filler) with short fields (boolean, age) to exercise wrapping, empty states, and sorting. For pure layout texture, pair with the Lorem generator.

Local database seeding

Export SQL and check table/column types before running it in a dev database. Booleans become TRUE/FALSE. Do not load PII-shaped random values into production.

Practical tips

  1. Name columns first so fixtures match the real API contract.
  2. Start small: 10–20 rows for UI; hundreds for scroll; this tool stops at 1000 — use server scripts for heavier load tests.
  3. Pick locale for the audience: CN phones/addresses for domestic demos; English/US for international walkthroughs.
  4. Use a seed for stable samples in docs, CI, and review threads.
  5. Stay compliant: format-like fake data is still not real people — keep it out of production.

Mock Data vs China test-data tools

This generator is a generic multi-field table builder. When you need China-specific identifiers in bulk with stronger region/BIN coverage, use the dedicated China test-data generator and validators (ID card, credit code, plate). Overlap is intentional:

NeedPrefer
Mixed user rows (name + email + UUID + dates) for UI mocksThis mock generator
Syntactically valid CN ID / bank card / USCC batchesChina test-data tools
Check whether a pasted number passes checksumFormat validators on the same cluster

ID-card values here now use GB 11643 MOD 11-2 check digits; bank cards use Luhn against public test BINs. They still map to no real person or account—checksum-valid is not “issued-valid.”

Seed hygiene and fixture collisions

A seed only freezes randomness for the exact request: field keys, column names, count, locale, format, and (for time-ish fields) the wall clock injected at generation. Teams trip over three patterns:

  1. Renaming a column while keeping the seed — output changes because field specs are part of the digest inputs
  2. Sharing one seed across environments with different default locales — CN vs US phones diverge even when the seed string matches
  3. Snapshotting SQL then editing the table name by hand — fine for loading, but regenerate from the tool when columns change so quotes/escaping stay consistent

Name seeds after the fixture (fixture-users-v2), not after a person (alice-laptop). Put the seed in the PR description when you paste sample JSON.

Honest limits

  • Output is a flat row of fields, not an arbitrary nested JSON tree. Assemble nesting in code if you need deeper structures.
  • Fields are independent (order time is not guaranteed after signup time); add relationships in your test helpers.
  • Checksum-valid ID/bank numbers are still synthetic — never load them into production, and do not treat them as proof that a real document exists.

Closing

Moving data fabrication out of hand-written fixtures speeds up mocks and demos. ToolVault's Mock Data Generator covers dozens of field types, locale samples, seeds, and multiple export formats, entirely on the client. When you need a schema contract, generate JSON and validate with the JSON Schema tools next.

Triage notes

'Seed hygiene' gets a section of its own with three traps because a seed only freezes the randomness of one request — fields, row count, locale, and format are all generation inputs, so renaming columns while keeping the seed still changes the output; hence the conventions of naming seeds after fixtures and pasting the seed alongside samples in PRs, defending against 'it generates differently on my machine'. The three items 'Honest limits' states as-is — flat row objects, no cross-field business relationships, a passing checksum not meaning a genuinely issued number — mark exactly the range the tool takes responsibility for; complex correlations go back to test code for a second pass. The first practical tip, define columns before generating, follows the same logic: align column names with the real API up front and save both ends the renaming round trip.