Fake data generator: from schema to JSON, CSV, SQL or TypeScript
Pick a preset, rename the keys, press Copy. That is the whole loop of this fake data generator. You define a schema, each field gets a name and a generator type, and the tool returns made-up records as JSON, CSV, SQL INSERT statements or a TypeScript file. It helps when the frontend is ready and the API is not, or when a demo database is empty and 500 users would make the screen look real.
The editor from preset to download
- Click a preset: Users, E-commerce, Orders, Companies, Blog or Locations. Users is loaded first, with 12 fields and 50 records.
- Change the fields. Rename a key, pick another type in the dropdown, duplicate or delete a row, or add one with "+ Add new field". Types with options show a parameter box.
- Set "Number of records". The slider ends at 500, but the number box takes up to 1000.
- Open a tab: JSON, CSV, SQL Insert, TypeScript or "Table (preview)". JSON can use 2 spaces, 4 spaces or no spacing.
- Click "Copy" or "Download". "Regenerate" draws a new random set.
42 field types and the three jobs of the root wrapper
The types sit in seven groups: identity (UUID, MongoDB ObjectId, auto-increment ID), person, location, numbers, dates, e-commerce and text. Some need a parameter. An integer range is written 21-65, a price 9.99-299.99, and "Pick from list" takes words such as paid, shipped, cancelled. The words true and false and plain numbers turn into real booleans and numbers.
A pattern field reads ORD-#{number:10000-99999} as a random number and #{index} as the row number. The root wrapper box does three things at once. Type users and the JSON becomes an object with a "users" array and a "total" count. The same word names the table in SQL and the interface in TypeScript.
Use SQL to seed a local Postgres or MySQL table, JSON for a mock server or a Storybook story, CSV to test a spreadsheet import.
Where the data looks fake on purpose
Values come from Math.random without a seed. You cannot repeat a run, and every field edit generates new data. Download the file when you need a fixed set. Names, streets and cities come from short built-in lists, mostly German and English, with 17 cities. The IBAN field writes DE plus random digits, so the checksum fails. Card numbers show four digits, asterisks and four digits. Emails use a few domains, including example.com, and some of the others may be real. Do not send mail to them.
CSV columns, SQL columns and TypeScript types come from the first row. Two fields with one name overwrite each other, and an empty name becomes field. Ranges cannot be negative. The SQL output has INSERT statements only, without CREATE TABLE. Objects such as coordinates are stored as JSON text. TypeScript knows string, number, boolean and Record, so dates are strings.
The table preview shows 100 rows. "Copy" and "Download" use the last text tab you opened, so switch to JSON, CSV, SQL or TypeScript first.
Your schema stays in this tab
JavaScript in the tab generates everything. Editing, switching tabs, "Copy" and "Download" send no request, and the Network panel of your developer tools shows it. "Download" saves a file named after the root wrapper, or mock-data, with the extension .json, .csv, .sql or .ts. The avatar field only writes a link to api.dicebear.com as text, and nothing loads it unless you open it.