Skip to main content

Privacy First

CSV to SQL INSERT

Generate SQL INSERTs from CSV

Convert CSV rows to INSERT statements for PostgreSQL, MySQL/MariaDB, or Microsoft SQL Server. Safe identifier quoting, correct value escaping, optional transaction wrapper, and configurable batch size. All processing happens in your browser.

Example output

INSERT INTO customers ("first_name", "last_name", "email")
VALUES ('Ada', 'Lovelace', 'ada@example.com');
Your file is processed locally in your browser and is never uploaded to WebF1.

Import CSV

Drag and drop a CSV file here, or

Paste CSV text instead

Frequently asked questions

Which SQL dialects are supported?
PostgreSQL, MySQL/MariaDB, and Microsoft SQL Server. Pick the dialect in the output settings; CSV Data Handyman quotes identifiers and escapes values appropriately for each (double quotes for PostgreSQL, backticks for MySQL, square brackets for MSSQL).
How are NULL values handled?
Use the "Null when blank" type on a column to emit NULL for empty cells. Blank text columns become empty strings.
Can I batch multiple rows into one INSERT?
Yes. Set the batch size in output settings. The default is one statement per row for easy review.
Can I wrap the output in a transaction?
Yes. Tick "Wrap in a transaction" to wrap all generated statements in BEGIN/START TRANSACTION ... COMMIT.
Should I review the SQL before running it?
Always. Review generated SQL, test in a non-production environment, and make a backup before running it. CSV Data Handyman does not execute SQL or connect to any database.

Related tools

  • CSV to JSON

    Convert CSV rows to a JSON array with renamed and nested fields.

  • CSV to XML

    Convert CSV rows to XML with configurable root and row elements.

  • CSV to SQL UPDATE

    Generate UPDATE statements with required WHERE keys for PostgreSQL, MySQL/MariaDB, and Microsoft SQL Server.

  • CSV to SQL UPSERT

    Generate upsert statements (ON CONFLICT, ON DUPLICATE KEY, or MERGE) for PostgreSQL, MySQL/MariaDB, and Microsoft SQL Server.

  • CSV Column Mapper

    Rename, reorder, transform, and map CSV columns for export.