Mock data generator for JSON, CSV, SQL and TypeScript
This mock data generator builds realistic-looking test rows from a schema you design. Add fields such as a first name, an email, a date range or a number between two limits, choose how many rows you need, and copy the result as JSON, newline-delimited JSON, CSV, SQL INSERT statements or a typed TypeScript array.
The data is seeded. The same seed and schema always give exactly the same rows, so a test fixture can be regenerated byte for byte, and changing the seed gives a fresh set. Everything is made in your browser from small built-in lists, with no upload, no account and no real personal data.
How to use the Mock Data Generator
- Pick a preset (users, products or orders) or build your own schema with “Add field”.
- Give each field a name and a type. Some types take options, such as
18,80for an integer range orred|green|bluefor a list. - Set the number of rows and the seed, and choose the name style.
- Choose the output format. For SQL, pick the database and table name; for TypeScript the table name becomes the interface name.
- Copy the output or download it as a file.
Mock Data Generator features
Repeatable by seed
A small, fast pseudo-random generator (mulberry32) drives every value, so output is identical for the same seed across browsers.
Related columns stay consistent
An email is built from the first and last name in the same row, so the row reads as one person.
Real SQL output
SQL uses the same engine as the CSV to SQL converter: quoted identifiers where needed, correct string escaping and column types for PostgreSQL, MySQL, SQLite or SQL Server.
Typed TypeScript
You get an export interface whose property types match the field types, followed by the typed array.
Tips for useful test data
- Commit the seed with the schema in your repository, so anyone can rebuild the same fixture instead of storing a large file.
- Include awkward cases on purpose: use the “Pick from a list” type for values such as
O'Neil|Smith Jr.|Zoëto test quotes and accents, and set date ranges that touch month and year boundaries. - Match the real column limits. If your table allows 255 characters, check that your schema produces values that fit.
Why the fake data is safe to use
Test data should never be mistaken for real data, and it should never reach a real inbox or phone. The generator therefore uses values reserved for examples:
- Emails end in
example.com,example.orgorexample.net, which RFC 2606 reserves so they never belong to a real mailbox. - Phone numbers look like
+1 555-0123. The North American numbers 555-0100 to 555-0199 are set aside for fictional use. - IPv4 addresses come from the three documentation ranges of RFC 5737: 192.0.2.0/24, 198.51.100.0/24 and 203.0.113.0/24.
- Cities and companies are invented by joining word parts, and names are random pairs from short lists, so a match with a real person is chance.
Field types and options
Use the UUID Generator when you need random identifiers outside a schema, and the JSON Formatter to tidy or validate the result.
| Type | Option | Example output |
|---|---|---|
| Integer | min,max | 18,80 gives 47 |
| Decimal | min,max,decimals | 5,500,2 gives 129.35 |
| Boolean | chance of true in % | 80 gives true about 8 times in 10 |
| Date / Date and time | from,to (YYYY-MM-DD) | 2026-03-14 or 2026-03-14 09:41:07, in UTC |
| Pick from a list | a|b|c | shipped |
| Row number | start | 1, 2, 3, and so on |
Mock Data Generator FAQ
What is mock data useful for?
It fills a database before a demo, feeds a front end while the API is still being built, gives unit tests stable fixtures, and lets you check how a table, chart or import behaves with a few thousand rows instead of three.
How do I generate mock data as JSON?
Design the schema, choose JSON as the format and copy the result. It is an array of objects, one per row, with numbers and booleans as real JSON types.
Can I get the same data again later?
Yes. Keep the seed and the schema. The generator is deterministic, so the same inputs return identical rows.
How many rows can it make?
Up to 10,000 rows per run. For larger files, generate several batches with different seeds, starting the row number field at a different value.
Can it create a TypeScript mock?
Choose TypeScript and you get an interface plus a typed constant array that you can paste straight into a test or a storybook file.
Is any of the data real?
No. Values come from short built-in lists and reserved example ranges. Names are random combinations of common names, so a coincidental match with a real person is possible but not intended.
Is my schema uploaded anywhere?
No. Everything runs in your browser, and nothing is sent or stored.