CSV to SQL INSERT Generator
Paste CSV and instantly build SQL INSERT statements with a table name, header, and delimiter options — runs 100% in your browser with no upload.
INSERT INTO users (name, age, city) VALUES ('Ada', 36, 'London');
INSERT INTO users (name, age, city) VALUES ('Grace', 45, 'New York, NY');🔒 Generated in your browser — nothing is uploaded.
Turn CSV rows into SQL INSERT statements
Paste comma-, semicolon-, or tab-separated data, type the target table name, and this tool builds one ready-to-run INSERT INTO ... VALUES (...); statement per row. Toggle First row is header to use your top row as the column names, or leave it off to get auto-named col1, col2, … columns. The output updates live as you type and copies with one click, so you can seed a database, write a migration, or load test data in seconds.
Correct quoting and escaping
Plain numbers such as 36 or -7 are emitted unquoted, while everything else is wrapped in single quotes like 'Ada'. Single quotes inside a value are escaped by doubling them, so O'Brien becomes 'O''Brien' instead of breaking your query. Quoted CSV fields keep commas and doubled quotes intact, values with leading zeros like 007 stay quoted so nothing is lost, and short rows are padded so every statement has a matching number of columns and values.
Frequently asked questions
Is my CSV data uploaded anywhere?
No. The entire conversion runs locally in your browser with JavaScript. Your CSV never leaves your device and nothing is sent to a server, so even sensitive or production data stays private.
How are numbers and text told apart?
A value that is a plain integer or decimal (optionally negative, with no leading zeros) is written unquoted, for example 36 or 3.14. Everything else — text, dates, values with leading zeros like 007, or empty cells — is wrapped in single quotes so it is stored exactly as typed.
What happens to single quotes and commas inside values?
Single quotes are escaped by doubling them following standard SQL string rules, so O'Brien becomes 'O''Brien'. Commas inside a value are preserved as long as the field is wrapped in double quotes in your CSV, exactly like a normal spreadsheet export.