Tools / SQL INSERT Fake Data Generator

SQL INSERT Fake Data Generator.

Generate INSERT statements with realistic fake rows for MySQL, PostgreSQL, SQLite or SQL Server.

Runs in your browser

Kinds: id, uuid, firstName, lastName, fullName, username, email, phone, company, street, city, country, zip, word, sentence, paragraph, int(min,max), decimal(min,max), price(min,max), bool, date, datetime, time, ipv4, ipv6, url, hostname, color, latitude, longitude, status. Add ? for 10% NULLs.

Ctrl/⌘ + Enter to run · Ctrl/⌘ + Shift + C to copy the result

Result

About SQL INSERT Fake Data Generator

SQL INSERT Fake Data Generator writes ready-to-run INSERT statements filled with plausible test data. Describe your table with one line per column, the column name followed by a kind, for example "email email", "age int(18,90)" or "balance decimal(0,5000)?", pick a dialect and a row count, and copy the SQL into your migration, seeder or database console. Within a row the values belong together: first_name, last_name, email and username are built from the same person, so [email protected] really belongs to Jane Smith. The dialect controls identifier quoting (backticks for MySQL, double quotes for PostgreSQL and SQLite, square brackets for SQL Server), boolean literals (TRUE/FALSE or 1/0), N'…' Unicode strings for SQL Server and backslash escaping for MySQL. Dates use the portable YYYY-MM-DD HH:MM:SS form. A trailing question mark makes a column nullable and leaves about one value in ten as NULL, which is a quick way to test how your queries and UI cope with missing data. Typical mistakes: generating ids that clash with existing rows (start from an empty table or drop the id column and let the database assign it), pasting a 1,000-row statement into a client with a small packet limit, and seeding real-looking emails. This tool only uses the reserved example.com, example.org and example.net domains and fictional 555-01xx phone numbers.

How to Use

  1. Enter the table name and one "column kind" line per column.
  2. Choose the dialect, number of rows and single or multi-row INSERT.
  3. Copy the SQL and run it against a development or test database.

Frequently Asked Questions

Which value kinds are available?

id, uuid, names, username, email, phone, company, address parts, words and sentences, int, decimal and price with an optional (min,max) range, bool, date, datetime, time, ipv4, ipv6, url, hostname, color, latitude, longitude and status.

Are the emails and phone numbers safe to use?

Yes. Emails use the RFC 2606 reserved domains example.com, example.org and example.net, and phone numbers use the fictional +1-555-0100 to 0199 range.

Can I get one INSERT per row?

Yes. Turn off "One multi-row INSERT" to get a separate statement for every row, which is easier to diff or run selectively.

Is anything sent to a server?

No. The data is generated in your browser using its secure random generator.

Related Tools