Dev
Dummy SQL INSERT Generator
Seeding a test database by writing INSERT statements by hand is one of the most repetitive tasks in backend development. You repeat the same column list, invent plausible values for each row, escape strings properly, and format timestamps correctly — for every table, every sprint. This generator automates that work for five of the most common table schemas. The Table Type selector determines the column list and the value shapes. Users produces INSERT INTO users (id, first_name, last_name, email, role, created_at) with realistic names, emails, role enums (admin, user, editor), and timestamps spread across the past year. Orders generates INSERT INTO orders (id, customer_id, status, total, currency, created_at) with five status values and decimal totals between $5 and $500. Products covers INSERT INTO products (id, name, sku, price, stock, category) with product names, SKU codes, prices, inventory counts, and category strings. Events outputs INSERT INTO events (id, event_type, user_id, page, browser, occurred_at) with click/pageview/signup event types and common page paths. Sessions generates INSERT INTO sessions (id, user_id, ip_address, started_at, last_active) with random IPv4 addresses and overlapping start and activity timestamps. The row count field accepts 1 to 50 rows per batch. All strings are single-quote escaped. The output runs without modification in MySQL, PostgreSQL, SQLite, and MariaDB.
How to use
- Choose your options above
- Click Generate
- Copy your result
Detailed instructions
- Select your target table type from the Table dropdown: users, orders, products, events, or sessions.
- Set the Number of Rows input to how many INSERT statements you need, then click Generate.
- Review the output in the Generated SQL panel to confirm the schema matches your expectations.
- Copy the full output and paste it directly into your database console, SQL client, or seed file.
- Run the statements against your database and verify the inserted rows with a quick SELECT query.
Use Cases
- •Seeding a local PostgreSQL users table with 50 rows before writing authentication middleware in Express or Django
- •Loading a staging orders table with realistic totals to verify SUM, GROUP BY, and HAVING aggregations return correct results
- •Populating a products table to demo a Shopify-style storefront prototype to a client without exposing live inventory
- •Generating fixture rows for a Cypress or Playwright integration test that queries a real database rather than a mock
- •Teaching SQL JOIN and WHERE clauses with believable users, orders, and sessions data instead of meaningless placeholder values
Tips
- →Generate the users table first, then orders — order records reference user IDs, so insert users before running related tables.
- →Combine outputs from multiple table types into one .sql file to seed an entire relational schema in a single execution.
- →Use the products and orders outputs together to test JOIN queries and foreign key relationships without manually matching IDs.
- →If you need more than 50 rows, run the generator several times and concatenate the outputs — each batch uses different values.
- →Paste the output into DB Fiddle or SQLFiddle to share a live, runnable example with teammates or in bug reports.
- →For performance tests, insert generated rows into a table with no indexes first, then add indexes and compare query plans.
FAQ
which databases can I paste this generated SQL into
The INSERT statements use standard SQL with no dialect-specific functions, so they run unchanged in MySQL, PostgreSQL, SQLite, and MariaDB. You can drop the output into a database console, a .sql file, a Knex seed script, or a Flyway migration without any modification.
is fake sql seed data safe to use in a staging environment
Yes — every name, email, and order detail is fully synthetic and not tied to any real person, so there are no GDPR or privacy concerns. Just make sure your connection string points at staging, not production, before running the script.
can I use this for a custom table schema not in the preset list
The tool covers five presets: users, orders, products, events, and sessions. Pick the closest match and do a find-and-replace on column names in a text editor — the realistic value formatting, escaped strings, and spread timestamps will still save you significant time compared to writing INSERTs from scratch.
how do I seed more than 50 rows
Run the generator multiple times with count set to 50 and concatenate the outputs. Each batch uses independently randomized values, so concatenating several runs produces a diverse dataset. Before concatenating, ensure row IDs do not conflict — each batch starts at ID 1, so offset subsequent batches manually or replace the ID column with a database-generated sequence.
You might also like
Popular tools from other categories that share themes with this one.
Try these next
More free tools from other corners of the catalog, picked by shared themes.