CSV to SQL Converter
Turn CSV data into SQL INSERT statements plus a CREATE TABLE, with dialect-aware quoting and column type inference.
Drag & drop a .csv or .tsv file here, or click to browse
No uploads. Your files stay on your device.
How it works
Paste your CSV — or drop a .csv/.tsv file — and the SQL appears
instantly. The parser follows RFC 4180, so quoted fields containing commas, line breaks and
escaped "" quotes are handled correctly, and the delimiter (comma, semicolon,
tab or pipe) is auto-detected. The header row becomes the column list, sanitised into valid
identifiers, and every column gets a type inferred from its data: whole numbers become
INT, decimals DOUBLE, true/false become
booleans, YYYY-MM-DD values become DATE and everything else becomes
VARCHAR(255) or TEXT.
Pick your dialect and identifiers are quoted the right way — backticks for MySQL, double
quotes for PostgreSQL and SQLite, square brackets for SQL Server — while single quotes inside
values are escaped so O'Brien can never break a statement. Choose one
INSERT per row for readable diffs, or a single multi-row INSERT for
much faster bulk loading. Everything runs in your browser with plain JavaScript: the CSV is
never uploaded, so production exports and customer data stay on your machine.
Frequently asked questions
How do I convert a CSV file to SQL INSERT statements?
Paste your CSV or drop the .csv file into the box, type the target table name and pick your SQL dialect. The tool parses the CSV, uses the header row for column names and writes one INSERT statement per row (or a single batched multi-row INSERT) instantly. Copy the SQL or download it as a .sql file and run it in your database client.
Which SQL dialects and column types are supported?
MySQL/MariaDB, PostgreSQL, SQLite and SQL Server. Identifiers are quoted the way each dialect expects — backticks, double quotes or square brackets — and inferred types use that dialect's names, so a decimal column becomes DOUBLE in MySQL, DOUBLE PRECISION in PostgreSQL, REAL in SQLite and FLOAT in SQL Server. Booleans become TRUE/FALSE or 1/0 as appropriate.
Is my CSV uploaded anywhere?
No. The CSV is parsed and the SQL is generated entirely in your browser with JavaScript — nothing is sent to a server, stored or logged. That makes it safe for production exports and customer data. Single quotes inside values are escaped automatically, so a name like O'Brien can never break a statement.