AbraCalc

CSV to SQL INSERT Generator

Turn a CSV into SQL INSERT statements for any table name, with automatic number/boolean detection and quoting.

Pure browser JavaScript. CSV parsing by PapaParse (MIT), self-hosted.

Embed this tool on your site

How to use this tool

  1. Paste CSV or upload a .csv file with a header row.
  2. Type your target table name and choose options.
  3. Click Generate SQL, then Copy or Download the .sql file.

Turn a CSV into SQL INSERT statements for any table name, with automatic number/boolean detection and quoting.

Frequently asked questions

How are strings escaped?
Single quotes inside values are doubled ('') and the whole value is quoted, the SQL-standard way. Identifiers are wrapped in double quotes.
What is the multi-row option?
It emits one INSERT with many VALUES tuples, which is faster to run than one statement per row in most databases.

References & sources