📇 CSV to SQL INSERT Converter
Paste CSV (with a header row) and get SQL INSERT statements — the header becomes the columns and each row an INSERT, safely quoted.
2 rows
How the csv to sql insert converter works
The tool parses your CSV with a proper RFC 4180 parser (so quoted fields containing commas, quotes or newlines are handled correctly), takes the first row as the column names, and turns each remaining row into an INSERT. Each cell is typed: values that look numeric stay as number literals, true/false become booleans, empty cells become NULL, and everything else is single-quoted with embedded quotes doubled. Choose your delimiter for European CSVs (semicolon), TSV (tab) or pipe-separated data.
The quoting and RFC 4180 parsing are what separate this from a naive split-on-comma: a name like "Bo, Jr" or an address with a comma won’t shift your columns, and an apostrophe won’t break the SQL. Empty cells map to NULL by default, which is usually what you want for a real import. The output is standard INSERT syntax for PostgreSQL, MySQL and SQLite. It all runs locally, so spreadsheet exports never leave your browser.
Frequently asked questions
How do I convert CSV to SQL INSERT statements?
Paste CSV with a header row and set the table name. The header becomes the column list and each row becomes an INSERT with typed, escaped values. Copy and run them.
Does it handle commas and quotes inside fields?
Yes — it uses a proper RFC 4180 CSV parser, so a quoted field like "Bo, Jr" stays as one value and doubled quotes ("") are decoded, rather than being split on every comma.
What happens to empty cells?
Empty cells become NULL, which is normally what you want for a database import. Numeric-looking cells become number literals and true/false become booleans; other text is single-quoted and escaped.
Can I use semicolon or tab-separated data?
Yes — pick the delimiter (comma, semicolon, tab or pipe) to match your export, including European-style semicolon CSVs and TSV files.
Is my CSV uploaded?
No — parsing and SQL generation run entirely in your browser and work offline, so your data never leaves your device.