Convert a CSV to SQL INSERT statements

Paste or upload a CSV file and specify the target table name: the tool generates one INSERT INTO statement per row, ready to paste into your database.

Example:
Drag and drop a .csv file here, or paste the content below.

How it works

Handy when you have a CSV export (from a spreadsheet, a CRM, a legacy system) and want to quickly import it into a database without going through a dedicated import tool or writing a script. Paste or upload your CSV with a header, specify the target table name, click "Generate SQL" and paste the resulting INSERT INTO statements directly into your SQL client.

How are quotes and apostrophes in values handled?

Each text value is wrapped in single quotes, and any apostrophes it contains are automatically doubled (standard SQL convention), for example O'Brien becomes 'O''Brien'. This prevents breaking the SQL syntax if a name or comment contains an apostrophe.

Are numbers properly treated as numbers?

Yes: a value that looks like an integer or a decimal number (for example 42 or 19.90) is inserted as-is, without quotes, so that the column is correctly recognized as numeric by the database. All other values (text, dates, empty values) are wrapped in single quotes.

Processing is entirely local, performed in your browser via WebAssembly: your file never leaves your computer.