AZ Tools

CSV → SQL INSERT Generator

Convert

Paste tabular data and the tool builds INSERT statements ready for any database. Pick the SQL dialect (Standard, MySQL, PostgreSQL, SQLite) for the right identifier quoting, toggle multi-row INSERT for compact output, and let the tool infer types so numbers and booleans go in unquoted. Handles quoted CSV cells, header detection, and auto-delimiter detection.

SQL
INSERT INTO "users" ("id", "name", "role", "joined", "score", "active") VALUES (1, 'Alice', 'Engineer', '2024-01-15', 87.5, TRUE);
INSERT INTO "users" ("id", "name", "role", "joined", "score", "active") VALUES (2, 'Bob', 'Designer', '2023-08-22', 92.0, TRUE);
INSERT INTO "users" ("id", "name", "role", "joined", "score", "active") VALUES (3, 'Carol', 'PM', '2025-03-04', 79.3, FALSE);

How to use

  1. Paste CSV / TSV / pipe / semicolon data.
  2. Set the table name and SQL dialect.
  3. Toggle multi-row INSERT and type inference as needed.
  4. Copy the SQL into your migration / seed file.

Frequently asked questions

What's multi-row INSERT?
Instead of one INSERT statement per row, multi-row produces a single INSERT with all VALUES tuples. It's much faster for bulk loads but harder to read.
How does type inference work?
Integers (123), decimals (1.5), TRUE/FALSE, and NULL go in unquoted. Everything else is treated as a string and wrapped in single quotes with proper escaping.
Will it inject SQL?
Quotes inside strings are doubled ('it''s safe'), which is the standard SQL escape. Don't rely on this for untrusted data — use parameterized queries in production code; this tool is for seed data and migrations.
Why is identifier quoting different per dialect?
MySQL uses backticks (`col`), PostgreSQL and SQLite use double quotes ("col"), and Standard SQL (SQL-92) also uses double quotes. The tool picks the right one so the output runs on your target DB.

Related tools