Skip to content
hateitall

SQL INSERT Generator

Paste rows in whatever shape you have them and get INSERT statements ready for your database.

Processed locallyIn: CSV, JSONOut: SQL

Loading tool…

How to use sql insert generator

  1. Paste CSV or a JSON array; the format is detected as you paste.

  2. Name the table and choose the database.

  3. Set rows per statement, CREATE TABLE, a transaction and NULL handling.

  4. 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.

CSV to INSERT statements with CREATE TABLE for four databases

CSV · TSV→ SQLLight on device

JSON array of objects to INSERT statements and CREATE TABLE

JSON→ SQLLight on device

Readable SQL with clauses, joins and subqueries laid out

SQL→ SQLLight on device

Seeded fake users, orders and products as JSON, CSV, SQL or TypeScript

Field list→ JSONLight on device