Back to Free Tools
FREE TOOLS
CSV to SQL Insert Generator
Generate quoted SQLite INSERT statements from CSV values without type or NULL inference.
CSV, TSV, UTF-8 delimited text
SQLite-compatible SQL text
Browser only
Runs locally in your browser. Your files, pasted content and generated output are not uploaded. Reset clears this tool’s working data.
This tool needs JavaScript. If it does not load, refresh the page and try again.
How to use this tool
- Paste CSV input or choose a CSV file, then choose Input delimiter. A selected file takes precedence.
- Enter SQLite table name as one literal identifier. Supply unique nonempty CSV headers matching the intended existing target columns.
- Select Generate SQL inserts and download inserts.sql. Review the statements and target schema before executing them in your own database.
Examples
A value O'Neil is emitted as the SQL text literal O''Neil inside quotes; a CSV value 001 stays a quoted text literal.
Limitations
- Up to 5 MiB UTF-8 input, 50,000 data rows, 500 columns, 500,000 cells including headers, a 1-200 UTF-16-unit table name and 20 MiB SQL output; repeated identifier prefixes count toward the output cap. Worker deadline: 30 seconds.
- SQLite-compatible quoting only. Every value is emitted as a text literal; preserving numeric-looking and empty strings when executing requires compatible TEXT columns. Target schema affinity, constraints and existing table/column names still apply.
- Headers differing only by ASCII A-Z case are rejected because SQLite treats those identifiers as the same name. Non-ASCII names retain their original case. NUL characters in identifiers/data are rejected.
- A dot in the table name is quoted literally and does not select a schema. No CREATE TABLE, NULL/type inference, database connection, product-side SQL execution or spreadsheet formula escaping is performed.
- Quoted embedded line breaks are retained, so one statement can span physical lines. Pasted text normalizes line endings; use a UTF-8 file to preserve embedded original line endings.
Related tools
No items found.