🗄️

SQL Insert Generator

Turn CSV data into SQL INSERT statements

🧑‍💻 Developer ToolsFreeRuns in your browser
No data yet

Values are escaped by doubling single quotes, and identifiers are quoted for the dialect you choose. Review the output before running it, especially for dates and large numbers.

About the SQL Insert Generator

The SQL Insert Generator converts spreadsheet data into INSERT statements. Paste rows exported from a spreadsheet, map the first row to column names, and copy statements for MySQL or Postgres.

Generated SQL is a convenience for seeds and small imports, not a bulk loader. For large datasets use the database's native import command, which handles types and transactions properly.

  • ✓Comma, tab, and semicolon data
  • ✓Single or multi-row INSERT output
  • ✓Empty values as NULL

How to use the SQL Insert Generator

  1. 1

    Paste CSV or tab-separated rows.

  2. 2

    Set the table name and quoting style.

  3. 3

    Copy the generated statements.

Frequently asked questions

How are quotes in my data handled?+

Single quotes are doubled, which is the standard SQL escape. Backslashes are left alone, so check MySQL data that contains them.

Why are dates wrapped in quotes?+

The generator treats columns as text by default. Quoted ISO dates work in MySQL and Postgres, but you may prefer an explicit cast in stricter schemas.

Save SQL Insert Generator to your favorites, or keep browsing developer tools.

Browse all 35 developer tools →