SQL INSERT Generator
This SQL INSERT generator turns a table into an INSERT INTO script. Type rows into a grid, paste CSV, or upload an Excel sheet, and copy one multi-row INSERT statement for seed data, test fixtures, or a quick data migration. It runs entirely in your browser, so the data is not uploaded.
What the Output Looks Like
Given a table with the headers id, name, and email:
INSERT INTO `table_name` (`id`, `name`, `email`)
VALUES
(1, 'Alice', 'alice@example.com'),
(2, 'O''Brien', NULL);
How values are written:
| Cell content | SQL output |
|---|---|
Digits only, e.g. 42 or 3.14 | Unquoted number: 42 |
Empty, or the text NULL | NULL |
| Anything else | Single-quoted string, with ' doubled: 'O''Brien' |
Column names come from the header row and are quoted with backticks. The table name is the placeholder table_name; replace it with your real table name after copying.
The multi-row VALUES syntax is supported by MySQL, PostgreSQL, and SQLite.
Common Uses
- Seed or fixture data for local development and automated tests
- Moving a small spreadsheet or CSV export into a database table
- Writing a reproducible data patch to review in a pull request