CSV to SQL Converter
Convert CSV to SQL online. Generate INSERT statements from a CSV file. Free CSV to SQL converter.
CSV
SQL
Features
- Generate INSERT statements from CSV
- Quote strings, pass through obvious numbers and booleans
- Empty cells become NULL
- Sanitize table and column identifiers
- Copy a script for local Postgres or SQLite
Common Use Cases
- Seed a local database from a sheet
- Build a demo dataset
- Move a small export without writing a loader
- Show a teammate the column mapping
This is not a migration tool
Types are guessed from the cell text. ZIP codes that look like numbers will be emitted unquoted. Identifiers are stripped to ASCII word characters. For production loads use COPY, a proper ETL, or a typed schema.
Examples
Valid - Typical row
id,name
1,AdaFrequently Asked Questions
SQL injection?
Values are quoted with doubled single quotes. Still, do not run generated SQL from untrusted CSV on production.
Which dialect?
Generic INSERT. Postgres, SQLite, and MySQL accept this shape for simple seeds.
Tips
- Rename the table to something real before you run it.
- Leading-zero IDs should stay quoted. Prefix the column or force text in the sheet.