Home / Tools / CSV to SQL INSERT
SQL WORKSPACE

CSV to SQL INSERTFREE · LOCAL

Generate reviewable INSERT statements for PostgreSQL, MySQL or SQLite.

Files and input stay in your browser. Input up to 5MB. Tables: 20,000 data rows · 200 columns. Output up to 20MB.

01Input and options

02Review the result

The table preview shows the first 50 data rows. Copy and download include the full text result; split ZIP contains all parts while copy shows only the first part. CSV / TSV downloads use UTF-8 BOM. Formula-like values may receive a protective apostrophe. Review leading zeros, dates and blanks when reopening in a spreadsheet.

Enter data or load an example to begin.

How to use CSV to SQL INSERT

  1. Load the example to check the expected input shape, or select your file. Keep a separate copy of the original.
  2. Review the options and rules below. Run the tool, then compare representative values, row counts and headers.
  3. Copy the output or download a new file. Input changes clear the previous result so you cannot download stale output.

Rules and limitations

Use a table name with letters, digits and underscores. Values are quoted strings, including empty strings. Types and constraints are not inferred. MySQL output sets NO_BACKSLASH_ESCAPES; PostgreSQL values containing backslashes are rejected. Review the generated SQL in a test database. Nothing is executed here.

Worked example

Use the English example button above. Identifiers such as 0012 are strings; they should not silently become 12. For conversion, compare record counts before and after. For cleaning, filtering, comparison and lookup, check the operation-specific summary.

Troubleshooting

If columns shift, check the delimiter and quote fields containing delimiters or newlines. If characters look wrong, select the encoding before loading the original file again. CSV has no stored cell types; spreadsheet software may infer numbers and dates when opening it.

Does my file leave my device?

The tool processes selected files and pasted input in browser memory. It does not upload the file or its name. Hosting providers may process page-request metadata such as IP address and requested URL. See the privacy notice.

Read the usage reference · Choose another tool