MySQL Fake Data Generator
Generate dummy rows as MySQL / MariaDB INSERT statements, with a matching CREATE TABLE. Pick fields or paste a JSON Schema.
Define your fields above and hit Generate
Example output
CREATE TABLE `customers` (
`id` CHAR(36),
`first_name` TEXT,
`last_name` TEXT,
`email` TEXT,
`company` TEXT,
`country` TEXT,
`lifetime_value` DOUBLE
);
INSERT INTO `customers` (`id`, `first_name`, `last_name`, `email`, `company`, `country`, `lifetime_value`) VALUES
('6eb17caf-9dcd-49de-9942-514e0596584a', 'Lisa', 'Anderson', 'olga.clark78@test.dev', 'Tyrell Corp', 'Germany', 896.4),
('46b12cc9-d8f7-4afb-8579-021c370fc170', 'Robert', 'Rossi', 'kwame.anderson83@example.com', 'Massive Dynamic', 'Brazil', 457.98),
('82a75eeb-2f28-43a2-88f2-555805744f78', 'Ahmed', 'Thompson', 'elizabeth.martinez92@test.dev', 'Gringotts', 'United Kingdom', 187.16);Loading it
mysql
mysql -u root -p mydb < mock-data.sql
Docker
docker exec -i my-mysql mysql -u root -p"$MYSQL_ROOT_PASSWORD" mydb < mock-data.sql
How the MySQL output is built
- →Identifiers are quoted with backticks and strings are escaped for MySQL's default sql_mode.
- →UUIDs are stored as CHAR(36), booleans as TINYINT(1), decimals as DOUBLE, nested values as JSON columns, and timestamps as DATETIME.
- →The same file loads into MariaDB.
- →Rows are batched, 500 per INSERT, to stay well under max_allowed_packet.
Frequently asked
How do I import the file into MySQL?
Run mysql -u user -p yourdb < mock-data.sql, or use MySQL Workbench's File → Run SQL Script, or phpMyAdmin's Import tab.
Does it work with MariaDB and PlanetScale?
Yes. The statements use syntax both MySQL 8 and MariaDB accept. On PlanetScale or Vitess, untick CREATE TABLE if your schema is managed by migrations.
Why are UUIDs CHAR(36) and not BINARY(16)?
CHAR(36) is readable and works everywhere. For large tables, convert with UUID_TO_BIN() into a BINARY(16) column to save space.
Everything is generated in your browser. Need the data in another shape? Convert it with CSV ↔ JSON, or describe its structure first with the JSON Schema Generator.