ToolsTray

Star a tool to keep it here.

Mock Data Generator

A mock data generator for test tables: names, emails, UUIDs, timestamps and prices, up to 1,000 rows a run. Export as JSON, CSV or SQL INSERTs, and set a seed when the rows have to repeat.

Output

Your rows land here once you press Generate.

Format

Named from the columns until you rename it; Save schema keeps it under this name.

The first press downloads about 400 KB of Faker word lists, about 150 KB over the wire, once per visit; every run after it is instant.

1 to 1,000

Optional

Schema

How to use

  1. Start from the four columns already in the schema. Rename any of them to match your table, or swap the field type from the dropdown alongside.
  2. Press Add field for each extra column, and use the × at the end of a row to drop one you don't want.
  3. Set Rows. It opens at 10 and takes anything up to 1,000.
  4. Choose the Format. Picking SQL reveals a table name box that starts on mock_data.
  5. Press Generate, read a few rows in the Output well, then hit Download or Copy output. Name the schema and press Save schema if you will want the same rows next week.

About this tool

A mock data generator saves you from typing out a hundred rows of plausible nonsense before you can test anything. You describe the columns, it fills in the values. The schema here opens with four columns already set up: id as a UUID, name, email, and created_at as a timestamp. Press Generate and ten rows fill the Output well at the top, coloured for JSON and SQL.

Each row of the schema is a column name, a type, and one sample of what that type makes, so you can see a Decimal is 1234.56 before you commit to it. Add field puts a new column on the end already named field_5 or whatever number is free, and you rename it in place. Two columns with the same name get refused before the run, ignoring case the way MySQL does, because one schema like that gives three different broken files.

The Seed box is the part worth knowing about. Leave it empty and every press gives you a different set of people. Type a number and that number produces the same rows every time, on any machine running the same Faker release; a new major version can change the word lists, so a saved schema notes which one it was made with. Seeding also pins the date fields to 1 January 2025, so timestamps stay put instead of sliding forward with today's clock. Save schema keeps the columns, the row count, the format and the seed together in this browser, and the page address carries the same set, so a link rebuilds the table you were looking at.

Format decides what comes out. JSON is a pretty-printed array indented two spaces. CSV writes a header row and wraps any cell holding a comma or a quote, doubling the quote characters inside it. SQL asks for a table name, offers mock_data if you don't care, and writes one INSERT per row with strings quoted, numbers bare and booleans as TRUE or FALSE; a backtick inside a name is doubled, which is how MySQL escapes one. Download names the file mock-data.json, mock-data.csv or mock-data.sql to match.

Three rows for a users table

Leave the four default columns as they are, set Rows to 3, put 7 in the Seed box, switch Format to SQL and type users as the table name. The first row comes out as INSERT INTO `users` (`id`, `name`, `email`, `created_at`) VALUES ('1c7bf881-47ac-4614-8e37-e09f38e28ca7', 'Mrs. Julie Smitham', 'Marlene.Reichel90@gmail.com', '2024-12-31T17:47:11.930Z');

Seed 7 gives you those exact three rows again next week. Notice that Julie's email says Marlene, which is the giveaway that each column is filled on its own.

Good to know

  • Nothing here is checked against reality. Names, emails, phone numbers and addresses come from Faker's English word lists stitched together with random digits, and each column is filled independently of the others, so a row's city, postcode and country rarely belong together. Occasionally a generated address or number will collide with a real one by chance, so keep the values sitting in a table and never send live email or SMS to them.

Frequently asked questions

How do I get the same rows back tomorrow?

Put a number in the Seed box and press Save schema, which keeps the seed with the columns, the row count and the format. Once seeded the generator is deterministic, so the same number over the same schema rebuilds the identical data set, dates included, because a seeded run measures its recent and past dates from 1 January 2025 rather than from now. The promise holds within one Faker major version; a schema saved under another one says so when you load it.

Why doesn't the email in a row match the name?

Every column runs its own generator and none of them look sideways at the others. That's why you get Julie Smitham with an address that says Marlene. For a matched pair, generate a first name and last name and build the address yourself in a spreadsheet formula afterwards.

What's the biggest batch it will do?

1,000 rows. Ask for more and the Rows field tells you it will build 1,000; anything under 1 builds a single row, and an empty box falls back to 10. If you need 50,000 rows for a load test, generate 1,000 with a seed and loop the file in your own script, since a browser tab is the wrong place to build that much text.

Will the SQL run against Postgres?

Not without an edit. Table and column names come out wrapped in backticks, which is MySQL and MariaDB syntax. Postgres and SQLite want double quotes there, so swap the backticks before you pipe the file in. The values themselves are fine either way, with single quotes inside strings escaped by doubling.

Where do the names and companies come from?

Faker's English locale, about 400 KB of word lists, roughly 150 KB over the wire, that the page fetches the first time you press Generate. After that it stays loaded, so the second batch appears without another download, and once the site's offline cache has it a first run works with no connection at all.

Can I get YAML or XML out of it?

Only JSON, CSV and SQL come out of here. JSON travels best of the three, so generate that and run it through a converter for anything else. Our JSON to CSV tool handles the flat direction if a spreadsheet is where it's headed.

Missing something in Mock Data Generator? Suggest a feature →

Tell someone who needs this.