Free, browser-based utilities for everyday developer workflows

CSV → SQL INSERT / UPSERT Generator

Paste spreadsheet rows as CSV and generate INSERT, UPSERT, or MERGE statements with configurable SQL dialect and keys.

  • Generate INSERT, UPSERT, or MERGE SQL from CSV headers and rows.
  • Supports PostgreSQL, MySQL, SQLite, and SQL Server output styles.
  • Handles NULLs, numeric detection, and unique-key-based update clauses.
  • Share results: Generate a secure link to share your current input and results with teammates — nothing is uploaded to any server.

Generation settings

CSV input

Preview

No rows parsed yet.

Generated SQL

Current generation summary

All parsing, validation, and SQL generation run locally in your browser. CSV data, generated SQL, and reports are never uploaded.

Column mapping & type profile

Include or exclude columns from INSERT / UPDATE / CREATE TABLE, rename SQL columns, set per-column type overrides, NULL policy, and constant values. Inferred types are based on the parsed sample.

Renaming SQL columns affects generated SQL only — the source CSV is untouched. Key columns are excluded from UPDATE SET clauses by default.

Keys & UPSERT / MERGE behavior

UPSERT / MERGE behavior depends on actual unique or primary key constraints in your database.

Dialect & identifier quoting

Batching & transactions

Large single-statement scripts may be slow or rejected by your client. Multi-row INSERT with a moderate batch size (100–1000) is usually safe.

DDL & staging

CREATE TABLE is a starter suggestion based on inferred CSV types. Review precision, indexes, constraints, and nullability before production use. IDs with leading zeros should remain text.

Validation report

Issues

    Exports

    Next steps

    How to use the CSV → SQL INSERT / UPSERT Generator

    Convert a CSV (or pasted spreadsheet) into dialect-aware INSERT, UPSERT, or MERGE statements ready for PostgreSQL, MySQL, SQL Server (T-SQL), SQLite, BigQuery, or Snowflake. Generate a starter CREATE TABLE with inferred types, batch large loads, wrap in transactions, and 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 (or load from file).
    2. Pick the SQL dialect (PostgreSQL, MySQL, T-SQL, SQLite, BigQuery, Snowflake).
    3. Set the target table name and choose the generation mode: INSERT, UPSERT/ON CONFLICT, or MERGE.
    4. For UPSERT / MERGE, specify the unique key columns.
    5. Open Preview / Columns to override SQL types, rename columns, or exclude columns.
    6. Use Batching / Transactions to split very large outputs and add a wrapping transaction.
    7. Open the Validation Report tab to fix duplicate keys, blank headers, and escaping issues before you run.
    8. 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.