SQL Test Data Generator
Define your table's columns, pick a data type for each — names, emails, cities, dates, numbers, enums — and get realistic fake rows as multi-row SQL INSERT statements, CSV or JSON. Everything is generated locally in your browser: nothing is uploaded, there is no signup, and no row limit games. Use it to seed development databases, reproduce bug reports, or fill a schema before a demo.
Do more than sql test data generator — meet Chat2DB
Chat2DB is an AI-powered SQL client for Windows, macOS and Linux. Write SQL in natural language, format and optimize queries automatically, and manage MySQL, PostgreSQL, Oracle and 20+ other databases in one workspace.
How to use
- Set the table name, row count and SQL dialect, then define your columns — each column gets a data type, and integers, decimals and dates take a min/max range.
- Add an optional NULL percentage per column to simulate incomplete data, and use the enum type for status-style columns with a fixed set of values.
- Copy the generated INSERT statements (batched for fast loading), or switch the output to CSV or JSON for imports and API fixtures. Hit Regenerate for a fresh sample.
Frequently asked questions
Is the generated data safe to use — does it contain real personal data?
The data is entirely synthetic: names are combined from small built-in word lists, emails use reserved example domains like example.com, and numbers and dates are random values inside the ranges you set. Nothing is scraped from real datasets and nothing you configure leaves your browser, so there is no GDPR or PII concern. That also makes it a safer alternative to copying production data into development environments.
How do I generate test data that respects foreign keys?
Generate the parent table first with a row-number id column (1..n), then generate the child table with an integer column whose range matches the parent ids — for example order.user_id as an integer between 1 and 500 when you created 500 users. Because the id column here is sequential rather than random, every child value is guaranteed to hit an existing parent. For more complex graphs, load tables in dependency order and keep the ranges aligned.
How many rows can I generate, and how should I load large batches?
The tool generates up to 1,000 rows per run, batched into multi-row INSERT statements (100 rows per statement by default), which loads dramatically faster than one INSERT per row. If you need millions of rows, generate the shape here and then scale it up inside the database with set-based SQL such as PostgreSQL's generate_series(), or export CSV and use COPY or LOAD DATA INFILE, which are the fastest bulk-loading paths.
