SQL INSERT Generator

Turn CSV, TSV, JSON or a Markdown table into INSERT statements, with per-dialect identifier quoting and batching.

Runs entirely in your browser. Nothing you type is uploaded.

About this tool

Paste a table or drop a file, name the target table, and pick how identifiers should be quoted. The input format is detected for you. Values are quoted as SQL string literals unless type detection recognises a number, boolean or null, and single quotes inside a value are escaped by doubling — the portable form that works on every engine. Rows per statement controls whether you get one statement per row or a batched multi-row INSERT.

Questions & answers

How do I convert CSV to SQL INSERT statements?
Paste the CSV, set the table name, and copy the result. The column names come from the first row, so the generated statement lists them explicitly and does not depend on your table's column order.
Does it protect against SQL injection?
It escapes single quotes by doubling them, which is correct for literals in generated scripts. It is not a substitute for parameterised queries in application code — use bound parameters there, and use this tool for seed data and one-off loads.
What does rows per statement change?
It sets how many value tuples go into a single INSERT. One row per statement is easiest to diff and to re-run selectively; larger batches load much faster but fail as a unit if one row is invalid.
Why did my leading zeros disappear?
Type detection recognised the value as a number. Turn off "Detect numbers, booleans and null" so every value is written as a quoted string and identifiers like 007 survive.

Related tools

Back to all Mini Tools