JSON to SQL Converter

Turn a JSON array — an API response, an export, a fixture file — into ready-to-run SQL INSERT statements without the data touching a server. Free, in-browser, with your table name and dialect of choice.

JSON

JSON is the standard data-interchange format of the web. It stores structured, possibly nested records in human-readable text and is the native format of most modern APIs and configuration files.

SQL

SQL INSERT scripts let you load tabular data straight into a relational database such as MySQL or PostgreSQL. Each row becomes part of a batched INSERT statement that you can run in any database client.

How the JSON to SQL conversion works

Your array of objects is flattened so nested paths become column names in dot notation (quoted per dialect, so they stay valid identifiers). Numbers stay unquoted, strings are escaped with doubled single quotes — O'Brien becomes 'O''Brien' — and null or missing fields become NULL.

Rows are grouped into multi-row INSERTs of up to 500 rows per statement, with backtick identifiers for MySQL or double quotes for ANSI databases like PostgreSQL. The table name defaults to my_table and anything you type is escaped correctly.

Frequently asked questions

How do nested JSON objects map to columns?
Each nested path becomes one column, e.g. user.address.city. The identifier is quoted per your dialect, so the dot is legal. Prefer single-level names? Untick flattening and nested objects are inserted as JSON strings.
Which databases can run the output?
MySQL/MariaDB with the MySQL dialect (backticks, escaped backslashes) and PostgreSQL, SQLite, or SQL Server with the ANSI dialect (double-quoted identifiers).
Does it generate CREATE TABLE too?
No — output is INSERT statements only. Create the table first with columns matching the generated column list, then run the script.
Is it safe for production data?
Values are escaped per the SQL standard and nothing is uploaded — the script is generated in a Web Worker on your device, free of charge.