Mock API Data Generator
About the Mock API Data Generator
This mock data generator creates realistic test records, such as users, orders, products and transactions, and exports them as JSON, CSV or a ready-to-run SQL script. Use it to seed a development database, fill a staging environment or prepare a demo without copying real customer data.
Why use mock data instead of production data?
Copying a production database into development or QA puts real names, emails and payment details on laptops and in CI logs. Under privacy laws such as GDPR and CCPA that is a data-protection risk, and many companies forbid it outright.
Mock data has the same shape as the real thing but describes nobody. Every value here is invented: emails use reserved test domains, phone numbers sit in the fictional 555-01xx block, and IBANs are clearly fake (GB..TEST...). You can share it in bug reports, screenshots and public repos.
How the SQL export works
Choosing SQL (CREATE + INSERT) produces a CREATE TABLE statement followed by one INSERT per record. Column types are inferred from the first generated row: whole numbers become INTEGER, decimals DECIMAL(12,2), flags BOOLEAN and everything else VARCHAR(255).
Table and column names are wrapped in double quotes, which is standard SQL and works as-is in PostgreSQL and SQLite. MySQL needs ANSI_QUOTES mode, or a find-and-replace of " with backticks. Single quotes inside values are escaped by doubling them, so a name like O'Brien is inserted as 'O''Brien'.
Choosing a preset for your test scenario
Users covers sign-up and profile screens, with an active flag and a creation timestamp. User accounts adds roles, last-login IPs and generated passwords for testing authentication and admin pages.
Orders and Transactions fit checkout, billing and reporting work, while Products, Companies, Employees and Addresses round out catalog, CRM, HR and shipping tests. Every preset is only a starting point: rename, add or remove fields to match your table.
How to Use the Mock API Data Generator
- Select a Preset that matches the table you want to fill. Users is loaded by default.
- Adjust the Fields: give each column the name used in your database and choose its type.
- Enter the number of Records (1-1000) and choose an Output format: JSON, CSV or SQL (CREATE + INSERT).
- For SQL, set the Table name used in the generated statements.
- Click Generate, then Copy the output or Download it as mock-data.sql, .csv or .json.
Frequently Asked Questions
- Does the generator store or upload my data?
- No. Everything is generated locally in your browser, and nothing is sent to a server or saved after you close the page.
- Which databases does the SQL work with?
- PostgreSQL and SQLite run it unchanged. For MySQL or MariaDB, enable ANSI_QUOTES or swap the double-quoted identifiers for backticks. SQL Server accepts double-quoted identifiers but uses BIT rather than BOOLEAN.
- Can I add primary keys or constraints?
- The script creates plain columns only. Add PRIMARY KEY, NOT NULL or foreign keys to the CREATE TABLE line after copying, or create the table yourself and keep only the INSERT statements.
- Is the mock data GDPR-safe?
- Yes. It is randomly assembled from lists of common first names, surnames, cities and companies, and is not derived from any real person's data.
- How many rows can I create at once?
- Up to 1,000 records per run. Generate several batches for larger tables, using UUID IDs so keys do not collide.
- Why are some generated names repeated?
- Names are drawn at random from a fixed list, so duplicates appear in larger sets, just as they do in real data. Use the Sequential ID or UUID types for unique keys.