Turn JSON records into SQL INSERT statements

An array of objects from an API or export becomes ready-to-run INSERTs — pick the table name and dialect, copy, run.

Tools used in this guide

The job

Seed data, a lookup table, or a handful of records from an API need to land in a database. Writing INSERTs by hand is tedious; a converter emits them with correct quoting.

Convert

Paste a JSON array of flat objects — every object becomes one row, keys become columns. Set the table name and pick a dialect (identifier quoting differs: backticks for MySQL, double quotes elsewhere). Strings are escaped, null becomes NULL, booleans and numbers pass through.

  • Mixed key sets are fine — the widest object defines the column list, missing values insert as NULL.
  • Nested objects/arrays are serialized to JSON strings, so they land in a TEXT/JSON column rather than failing.

Worked example

An API returned 12 product objects. Paste, set the table to `products`, choose MySQL quoting, and you get 12 `INSERT INTO` statements — paste into your migration or run in the console.

Where it stops

INSERTs only — no CREATE TABLE, no UPDATE/UPSERT. Input is a JSON array (or object for a single row) up to 2 MB and 2,000 rows. Validate the SQL before running it against production; generated statements assume the columns exist.