Mock Data Generator
Generate realistic rows for a schema as SQL, JSON, or CSV.
- Recent results are kept in this browser's local storage until you clear them.
History kept on this device
Recent results are kept in this browser's local storage until you clear them. - Processing happens in this page. No application server receives your input.
Runs in your browser
Processing happens in this page. No application server receives your input.
CREATE TABLE DDL (optional)
Fields
| Column name | Generator | Nullable (0..1) | Unique | Actions |
|---|---|---|---|---|
| No fields defined. Add a field or infer from CREATE TABLE DDL. | ||||
Generated mock data
What this tool does
Generates realistic rows for a schema (names, emails, addresses, timestamps, and sequence or UUID identifiers) as dialect-quoted INSERT statements, JSON arrays, JSON Lines, or CSV. Paste a CREATE TABLE statement to infer column names, generators, nullability, and uniqueness on the main thread, or configure each field one at a time in the table editor.
Seeded generation and worker streaming
Generation runs inside the isolated sql.worker.ts Web Worker with a lazy import of @faker-js/faker/locale/en. Every run calls faker.seed(seed) and walks fields in a fixed order so identical field definitions, row counts, and seeds produce byte-for-byte identical output. Runs stream progress every 1,000 rows and check for cooperative cancellation between chunks so cancelling a 100,000-row run stops cleanly without terminating the worker.
Dialect-aware SQL quoting
- Identifiers use dialect-specific quoting via
quoteIdent("users"for PostgreSQL, SQLite, and DuckDB;`users`for MySQL;[users]for SQL Server). - Literals use
quoteLiteralso embedded single quotes (such asO'Brien) are doubled to'O''Brien'and MySQL backslashes are escaped to\\.
Known limitations
Generated data is realistic rather than cross-column consistent: two rows can hold the same email unless the column is marked unique, and independent columns are drawn separately. Locale is fixed to English (en) for the entire run. A unique column whose generator cannot supply enough distinct values (such as boolean with 10 unique rows) is rejected before generation begins. The INSERT output is plain text for you to review and run deliberately; nothing here executes it or persists the generated output to browser storage.
Scope: this covers the page itself. Your browser, operating system, clipboard, downloads, extensions, and crash recovery may keep copies, and a compromised site origin would not be protected.