File & Data Tools
Convert CSV to SQL
Generate INSERT statements, optionally preceded by a CREATE TABLE with inferred column types.
- Free, no signup
- No upload — runs on your device
- No watermark
- Unlimited use
CSV to SQL
Processed locallyThe header row becomes the column names
The generated schema is a first draft, not a schema
Column types here are inferred from a 500-row sample. If every sampled value in a column is an integer, the column becomes INTEGER — and then row 12,000 contains N/A and your import fails. Sampling is a heuristic, and heuristics are wrong at the tails, which is exactly where dirty data lives.
Two specific traps. A column of values like 01234 looks numeric and will be typed INTEGER, destroying the leading zero on import — the same failure as Excel, arriving by a different route. And a column that is 499 integers and one empty string will be typed INTEGER, then reject the empty row rather than treating it as NULL.
Read the CREATE TABLE before you run it. Widen anything that might exceed the inferred type, change identifier-like numeric columns to TEXT, and add your own primary key — the generator does not invent one, because guessing which column is unique is a much worse error than omitting the constraint.
How it works
- Drop in a CSV
- Set the table name and pick a SQL dialect
- Review the generated types, then download the .sql file