CSV to SQL
Generate CREATE TABLE and batched INSERT statements from pasted CSV data.
Generate SQL from CSV
Rows: 0 · Columns: 0
· INSERT statements: 0
Inferred types: —
How to use the CSV to SQL
- Paste your CSV data and set the table name you want to use.
- Choose the rows per INSERT batch and whether to infer numeric types.
- Generate the SQL, then copy it or download the .sql file.
Features
- CREATE TABLE with INTEGER, REAL and TEXT type inference
- Batched INSERT statements to keep files manageable
- Column and table names sanitised for safe identifiers
- Single quotes escaped and empty cells written as NULL
Advertisement
Frequently Asked Questions
Common questions about the free online csv to sql.
Paste the CSV data, set the table name and rows per insert, then click Generate SQL and copy
or download the statements.
A column of whole numbers becomes INTEGER, decimals become REAL and anything else becomes
TEXT when type inference is on.
Grouping rows into multi row inserts keeps the script short and imports much faster than one
statement per row.
Every single quote inside a value is doubled, which is the standard SQL escape, so the
statement stays valid and safe.
An empty cell is written as NULL, so missing values are stored as proper nulls rather than
empty strings.
Yes. Untick the CREATE TABLE option if your table already exists and you only want the INSERT
statements.
The generated SQL uses standard double quoted identifiers and works with SQLite, PostgreSQL,
MySQL and SQL Server.
No. The SQL is generated in your browser and the download link is created locally on your
device.
Yes. Set any batch size from 1 to 1000 rows and the statements are grouped accordingly.
Yes. It is completely free with no account, no sign-up and no limit on how many files you
convert.
Last updated: October 10, 2026