Skip to main content
Toollyz

Search tools

Search for a command to run...

SQL Dummy Data Generator

Define a table schema with 19 fake-data field types and generate ready-to-run INSERT statements in PostgreSQL / SQLite, MySQL or SQL Server dialect. Multi-row inserts, transaction wrap, ON CONFLICT / ON DUPLICATE KEY support. 100% offline.

What is the SQL Dummy Data Generator?

SQL Dummy Data Generator combines the Fake JSON engine's 19 field types (UUID, names, emails, phones, addresses, cities, countries, companies, URLs, integers, floats, booleans, dates, ISO dates, lorem, literal) with three dialect-specific SQL emitters: PostgreSQL / SQLite (standard, double-quoted identifiers, `''` string escape), MySQL / MariaDB (backtick identifiers, backslash escapes), and SQL Server (bracket identifiers, `N'…'` Unicode literals). Pick a table name, define columns, and the tool emits ready-to-run INSERT statements with up to 10,000 rows. Options include single multi-row INSERT (default — much faster than one INSERT per row in PostgreSQL and MySQL), individual INSERTs per row (better for transactional fault isolation), transaction wrap (BEGIN / COMMIT), and conflict handling: `ON CONFLICT DO NOTHING` / `ON CONFLICT DO UPDATE` for Postgres or `ON DUPLICATE KEY UPDATE` for MySQL. Crypto-strong randomness via crypto.getRandomValues.

How to use it

  1. Pick a dialect (Postgres / MySQL / SQL Server) and a table name.
  2. Add columns — pick a name and a fake-data field type for each.
  3. Set the row count (1-10,000) and optionally enable transaction wrap or conflict handling.
  4. Copy the SQL or download as .sql, then run against your test database.

Benefits

  • Three SQL dialects: PostgreSQL/SQLite (standard), MySQL/MariaDB, SQL Server — with correct identifier quoting and string escaping for each.
  • 19 fake-data field types: UUID, names, emails, phones, addresses, cities, countries, companies, URLs, integers, floats, booleans, dates, lorem, literal.
  • crypto.getRandomValues with rejection sampling — uniform distribution, no modulo bias.
  • Multi-row INSERT (one statement, many rows) or individual INSERTs per row.
  • Optional BEGIN / COMMIT transaction wrap.
  • Conflict handling: ON CONFLICT DO NOTHING / DO UPDATE (Postgres), ON DUPLICATE KEY UPDATE (MySQL).
  • Up to 10,000 rows per generation.
  • Persists your schema and options in localStorage for one-click resume.
  • Runs 100% in your browser — Toollyz has no server.

Frequently asked questions

Which dialect should I pick?

PostgreSQL/SQLite is the safe default — both use standard ANSI SQL with double-quoted identifiers and `''` string escapes. MySQL uses backticks for identifiers and may need backslash escapes. SQL Server uses square brackets and `N'…'` for Unicode strings.

Does it generate CREATE TABLE statements?

Not currently — only INSERTs. You're expected to have the target table already defined. A future version may add CREATE TABLE generation.

What's the difference between multi-row and individual INSERTs?

Multi-row (`INSERT INTO t (a, b) VALUES (1, 'a'), (2, 'b'), …`) is much faster — typically 5-10x — because the database parses one statement instead of many. Individual INSERTs are better when you need per-row error isolation in a transaction.

What does ON CONFLICT DO NOTHING do?

PostgreSQL syntax for 'silently skip if a unique constraint is violated'. Equivalent in MySQL is `ON DUPLICATE KEY UPDATE id=id`. We emit the appropriate form for each dialect.

What about ON CONFLICT DO UPDATE?

Upsert — insert or update if a conflict occurs. We emit `… SET updated_at = EXCLUDED.updated_at` as a placeholder; edit the SQL to update the columns you actually want.

How big can the batch be?

Up to 10,000 rows per generation. For larger batches, run the generator multiple times and concatenate the output.

Will the data be truly random?

Yes — every random byte comes from `crypto.getRandomValues` with rejection sampling. UUIDs follow RFC 4122 v4 (correct version + variant bits).

Do I need an internet connection?

No. Data generation and SQL composition run entirely in your browser.

What if I want NULL values?

Add a 'literal' field with the value left empty — that emits `NULL` for that column on every row. For some-rows-only NULL, you'd need to post-process.

Does it handle JSON columns?

Yes — use a 'lorem' or 'literal' field to populate a JSON-typed column with JSON-formatted strings. The string will be quoted with the dialect's string escape rules.

Is anything uploaded?

No. Generation and SQL emission run entirely in your browser.