Skip to content
Local

Developer

SQL Insert Generator

Turn CSV or JSON rows into CREATE TABLE and batched INSERT statements for PostgreSQL, MySQL, SQLite or SQL Server.

Runs in your browser. Files stay on this device.Built with Papa Parse (MIT)

How to use SQL Insert Generator

  1. 1Paste CSV or JSON rows, or drop a file.
  2. 2Pick your database and name the table.
  3. 3Copy the SQL or download it as a .sql file.

Questions

How are quotes and special characters handled?

Single quotes are doubled, the standard SQL way. For MySQL backslashes are doubled too, and SQL Server strings get the N prefix so accents and other scripts survive.

How are column types chosen?

From the values. A column of whole numbers becomes an integer, true or false a boolean, YYYY-MM-DD a date, and anything mixed becomes text. Numbers with leading zeros, like postcodes, stay text.

Why split the rows into batches?

Very long INSERT statements can hit size limits. SQL Server allows at most 1,000 rows in one statement, so batches there never go above that.

Is my data uploaded?

No. The file is read and converted in your browser.

Is it free?

Yes. No account, no watermark and no daily limit.

Esc