Data Formatters & Converters Tool data stays in browser

CSV → SQL INSERT / UPSERT

Paste CSV with a header row to generate dialect-aware, batched INSERT statements — or an UPSERT keyed on your unique columns. Column types are inferred; a rollback DELETE and validation report sit in the extended view. Runs in your browser.

Guide

Auto-generates as you type. Ctrl+Enter to re-run.

Advanced options

How to use the CSV → SQL INSERT / UPSERT Generator

Convert a CSV (or pasted spreadsheet) into dialect-aware INSERT and UPSERT statements ready for PostgreSQL, MySQL, SQL Server, SQLite, Oracle, or BigQuery. Column types are inferred, identifiers are quoted per dialect, large loads are batched, and a rollback DELETE plus a validation report help you review the script before running it against your database. Nothing connects to a database and nothing is uploaded — generation is fully local.

What it does

When to use it

How to use it

  1. Paste your CSV including the header row.
  2. Pick the SQL dialect (PostgreSQL, MySQL, SQL Server, SQLite, Oracle, BigQuery).
  3. Set the target table name and choose the mode: INSERT, UPSERT, or INSERT … do nothing.
  4. For UPSERT, specify the unique key column(s).
  5. Adjust batch size, boolean style, and identifier quoting as needed.
  6. Open the Rollback & report tab to review inferred types, identifier warnings, and the rollback DELETE.
  7. Copy or download the generated SQL and review it before applying.

Tips & pitfalls

FAQ

Runs locally in your browser. No uploads. The tool generates SQL scripts but never connects to or executes against a database.

Related guides