ZeroTool Workbench

CSV to SQL Converter

Convert CSV data to SQL INSERT statements instantly in your browser. Supports MySQL, PostgreSQL, and SQLite dialects. Handles quoted fields, NULLs, batch mode. Free, no signup.

100% Client-Side Your data never leaves your browser Free · No Sign-Up
CSV Input
SQL Output

How to Use

  1. Paste your CSV data into the CSV Input textarea, or click Upload CSV to load a file.
  2. Select your SQL Dialect (MySQL, PostgreSQL, or SQLite).
  3. Enter a Table Name. The default is my_table.
  4. Choose Batch INSERT (one statement, multiple rows) or Individual INSERT (one statement per row).
  5. The SQL output updates instantly. Click Copy to copy it to your clipboard.

SQL Dialect Differences

DialectIdentifier quotingExample
MySQLBackticksINSERT INTO users (name) VALUES (‘Alice’);
PostgreSQLDouble quotesINSERT INTO “users” (“name”) VALUES (‘Alice’);
SQLiteDouble quotesINSERT INTO “users” (“name”) VALUES (‘Alice’);

NULL Handling

  • Empty CSV fields produce NULL (unquoted) in the SQL output.
  • Fields that contain only whitespace are treated as strings, not NULL.
  • Pure numeric values (integers and decimals) are inserted without quotes, so they are stored as numbers rather than strings.
  • All other values are wrapped in single quotes with internal single quotes escaped as .

FAQ

What does this tool do?

Converts CSV data into SQL INSERT statements. It reads the header row as column names and generates INSERT statements for each data row, with proper quoting and escaping for the chosen SQL dialect.

Which SQL dialects are supported?

MySQL (backtick quoting), PostgreSQL (double-quote quoting), and SQLite (double-quote quoting). The core INSERT syntax is the same; the difference is in how identifiers are quoted.

How are NULL values handled?

Empty fields in the CSV are converted to NULL in the SQL output (without quotes), which is the standard way to represent missing values in SQL.

What is batch INSERT mode?

Batch mode produces a single INSERT statement with multiple value rows: INSERT INTO tbl (col1) VALUES ('a'), ('b'), ('c'); — This is more efficient than running individual statements.

Is any data sent to a server?

No. All conversion happens in your browser using JavaScript. No CSV data is transmitted.