Mock Data Generator
The Mock Data Generator builds realistic fake rows — users, products, orders, blog posts — from a schema you define, with a seed that makes every run reproducible, and exports them as JSON, CSV, SQL INSERT, or TypeScript.
How to Use
- 1
Start from a preset schema (Users, Products, Orders, or Blog posts) or build your own: click Add field, name it, and pick a type such as email, date, integer, or UUID.
- 2
Set the ranges that matter: min and max for numbers, a start and end date for dates, or a comma-separated list for pick-from-list fields.
- 3
For computed values, add a template field using {{firstName}}, {{lastName}}, {{index}}, or any earlier field by name — for example {{firstName}}.{{lastName}}@example.com.
- 4
Choose how many rows to generate (1–1,000) and set a seed. The same seed with the same schema always produces the same rows, so teammates and CI runs reproduce your fixtures exactly.
- 5
Pick an export format: JSON, JSON Lines, CSV, SQL INSERT (Postgres or MySQL dialect), or a TypeScript array.
- 6
Copy the output or download it as a file, then paste it into your seed script, test fixture, or database client.
Frequently Asked Questions
What is mock data?
Is fake data safe?
What is a seed and why does it matter?
Mock data vs synthetic data — what is the difference?
Can I generate a million rows?
Is my schema uploaded anywhere?
How do I seed a Postgres database with mock data?
How do template fields work?
Can I use the output in unit tests?
Why are emails only on example.com?
Generative Answer & AI Documentation
What is the Mock Data Generator?
A mock data generator creates realistic-looking fake records from a schema you define: field names, field types, and ranges, filled with plausible values such as names, emails, dates, and prices. This tool runs entirely in your browser. You build a schema — or start from a Users, Products, Orders, or Blog posts preset — choose how many rows to make (up to 1,000), set a seed, and export the result as JSON, JSON Lines, CSV, SQL INSERT statements, or a TypeScript array. The values look real enough to exercise a UI or a database, but they are generated from built-in word lists and a seeded random number generator, so they carry no real person's information.
Why use Mock Data Generator offline?
Developing against an empty database is slow: every screen looks broken, every list is empty, and edge cases such as long names or zero-stock products never appear. Copying production data into development is the usual shortcut, and it is the risky one — it puts real emails, phone numbers, and addresses on developer machines and in test logs. Mock data gives you a third option: data that looks real, fills every state of your UI, and cannot leak anyone's privacy because it was never real. Because generation is client-side, your schema and seed never leave the browser, and the tool works offline.
When should you use this tool?
Use it when you seed a fresh development database, when you need fixtures for unit or integration tests, when you are building a UI before the API is ready, or when you want to demo a feature with a populated screen. It is also the right tool when a bug only appears with certain data — generate rows with a specific range or enum value and reproduce the case on demand. Do not use mock data for load testing at scale (the browser cap is 1,000 rows), for analytics (the values carry no real distributions), or anywhere real user data is required.
Key Benefits
- Reproducible fixtures: a seed makes the same schema produce the same rows on every machine, so a failing test can be re-run with identical data.
- Safe by construction: emails use only example.com and example.org, and phones use only the fictional 555 range, so test data can never reach a real person.
- Five export formats: JSON, JSON Lines, CSV, SQL INSERT for Postgres or MySQL, and a TypeScript array — paste straight into a seed script, fixture file, or database client.
- Fast iteration: change a range or an enum, regenerate, and see the new data immediately, with no server round-trip and no account.
Common Use Cases
- Seeding a Postgres or Supabase development database: export SQL INSERT statements for a Users table and run them in psql or the SQL editor.
- Filling a UI before the API is ready: generate a Products list as JSON and render it while the backend endpoint is still being built.
- Test fixtures for unit tests: export a TypeScript array with a fixed seed and import it as deterministic test input.
- Demo data for a feature walkthrough: generate a hundred orders with mixed statuses so every filter and empty state can be shown.
- Reproducing a data-dependent bug: generate rows in a narrow range — for example prices between 0 and 1 — and replay the failing case exactly.
Developer Notes & Best Practices
Worked example — seeding a Postgres Users table: build the Users preset, set the table name to users, choose the SQL INSERT format and the Postgres dialect, and generate 100 rows with a fixed seed such as demo-seed-42. The output is a block of INSERT INTO "users" ("id", "firstName", ...) VALUES (...) statements. Run them in psql or the Supabase SQL editor; the same seed regenerates the same rows later if you need to rebuild the database. Keep generated columns in the same order as your table's columns where it matters, and remember the tool does not know your constraints: if a column is unique, a duplicate value in a large generated batch will fail on insert, so keep the seed or the ranges narrow enough to stay unique, or generate in smaller batches. For unit tests, prefer the TypeScript export with a fixed seed and import it as a fixture — deterministic input makes failures reproducible in CI.
Field types at a glance
| Field type | What it generates | Options you set |
|---|---|---|
| firstName / lastName / fullName | A name from the built-in lists | None |
| name-based address on example.com or example.org | None — domain is picked automatically | |
| phone | A number in the fictional 555 range | None |
| address / city / company / jobTitle | A street address, city, company, or job title from the built-in lists | None |
| date / datetime | A date or timestamp inside your range | Start date, end date |
| integer / float | A number inside your range | Min, max (and decimals for float) |
| boolean | true or false, roughly half and half | None |
| uuid | A time-ordered UUID v7, deterministic per seed | None |
| enum | One value picked from your list | Comma-separated options |
| lorem | A short sentence of filler words | None |
| template | Your pattern with {{firstName}}, {{lastName}}, {{index}}, or earlier fields filled in | Template text |
- Fix the seed for anything shared: put the seed in the fixture file or seed script so teammates and CI generate the exact same rows.
- Match the shape of your real schema: use the same field names, types, and ranges as the production table, so generated rows exercise the same code paths.
- Generate in small batches and check the first few rows by eye before running a large insert — a wrong date range or enum value is cheaper to catch at 10 rows than at 1,000.
- Keep mock data out of production: label seed files clearly and never run a seed script against a production database.
Common Mistakes
- Using a random seed for a shared fixture, then wondering why a teammate's test data differs — fix the seed and write it down with the fixture.
- Forgetting that template fields can only see earlier fields: a template that references {{email}} must sit below the email field in the schema, or the token renders empty.
- Pasting generated SQL into production by accident — seed scripts belong in development and staging only, and should be clearly named.
- Assuming generated data is statistically realistic: the values look plausible one row at a time, but they do not reproduce the distributions of a real dataset, so do not use them for analytics or model training.
Limitations
The browser cap is 1,000 rows per run, so this tool is for development fixtures, not bulk loading or load testing — for millions of rows, run a faker library such as @faker-js/faker in a Node script or CI job. Values are drawn from built-in word lists, so names, cities, and companies repeat across large batches and carry no real-world distribution. The generator does not know your database constraints: it cannot guarantee uniqueness, foreign-key validity, or referential integrity between tables — if an orders table references user IDs, generate the users first and set the order userId range to match the IDs you created. Dates are generated uniformly across the range you set, with no business-day or seasonality logic.
Structured Input/Output Example
Schema: Users - id: UUID v7 - firstName: first name - lastName: last name - email: email - city: city - createdAt: date (2024-01-01 to 2026-11-15) Rows: 3 Seed: demo-seed-42
[
{
"id": "019b8c2a-1000-7a3f-8c1d-2e4a9b7c5d01",
"firstName": "Maya",
"lastName": "Chen",
"email": "maya.chen@example.com",
"city": "Portland",
"createdAt": "2025-03-14"
},
{
"id": "019b8c2a-1001-7b2e-8a4c-1f5b8d6e4c02",
"firstName": "Omar",
"lastName": "Haddad",
"email": "omar.haddad@example.org",
"city": "Austin",
"createdAt": "2024-11-02"
}
]Related Tools
JSON to TypeScript
Convert any JSON object or array into clean TypeScript interfaces or type aliases in seconds — 100% offline, nothing uploaded.
CSV to JSON
CSV to JSON converter: turn spreadsheets into JSON arrays instantly, with smart type inference ("42" → 42) and custom delimiter support. Free, offline.
JSON to CSV
JSON to CSV converter: flatten JSON arrays into spreadsheet-ready CSV in seconds. Nested objects become dot-notated columns; output opens cleanly in Excel.
SQL Formatter
SQL formatter: turn tangled single-line SQL into clean, readable statements with uppercase keywords and smart indentation for JOINs, subqueries, and CTEs.
UUID v7 Generator
UUID v7 generator: create time-ordered UUID v7 (RFC 9562), ULID, and NanoID identifiers in bulk, and decode embedded timestamps. Free, 100% offline.