CSV to INSERT statements with CREATE TABLE for four databases
SQL INSERT Generator
Paste rows in whatever shape you have them and get INSERT statements ready for your database.
Loading tool…
How to use sql insert generator
Paste CSV or a JSON array; the format is detected as you paste.
Name the table and choose the database.
Set rows per statement, CREATE TABLE, a transaction and NULL handling.
Copy or download the SQL.
What this tool does
- One tool for both CSV and JSON input, with automatic detection.
- Database-specific quoting of names and strings for PostgreSQL, MySQL, SQLite and SQL Server.
- Batches from one row per statement up to thousands per statement.
- Optional BEGIN and COMMIT around the whole script.
How the result is verified
The generated SQL is read back: each VALUES tuple is decoded and compared with the input data, and every tuple must have one value per column.
Frequently asked questions
Is a transaction worth it?
Yes for large imports: wrapping the INSERTs in one transaction makes the load all-or-nothing and usually much faster.
Which database settings matter?
Pick the database you will run it on. It changes how names are quoted, how quotes and backslashes in text are escaped, and how true and false are written.
Is my data uploaded to a server?
No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.
Related tools
JSON array of objects to INSERT statements and CREATE TABLE
A pasted list of values to a quoted, chunked IN (...) clause
Readable SQL with clauses, joins and subqueries laid out
Seeded fake users, orders and products as JSON, CSV, SQL or TypeScript