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.
How to use this tool
- Paste CSV or upload a .csv file with a header row.
- Type your target table name and choose options.
- 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.