What This Tool Does
This tool converts a JSON array of objects into ready-to-run SQL INSERT statements. Paste JSON, choose a dialect and table name, and get correctly quoted, escaped INSERT statements for every row, generated as you type.
How to Convert JSON to SQL
Paste a JSON array of objects, or a single object, into the input. Pick a dialect, set the table name, and choose how many rows to batch into each INSERT statement. The generated SQL updates automatically as you edit, or click Convert to run it manually.
Choosing a Dialect and Batch Size
SQL, MySQL, PostgreSQL, and SQLite each quote identifiers and strings slightly differently, MySQL uses backticks for identifiers while the others use double quotes, and PostgreSQL escapes strings differently from the rest. Batch size controls how many rows share a single INSERT statement: 1 row per statement is easiest to review and debug, larger batches like 100 or 500 rows generate far fewer statements and import faster.
How Values Are Escaped and Typed
Null and undefined values become SQL NULL, booleans become TRUE/FALSE or 1/0 depending on the dialect, numbers are inserted unquoted, and strings are quoted with the dialect's escaping rules applied, single quotes and backslashes are escaped so values with apostrophes or special characters don't break the generated SQL. Nested objects or arrays are stored as their JSON text.
Common Uses for a JSON to SQL Converter
Seeding a test or development database from an API response or exported JSON, migrating data exported as JSON into a SQL database, and quickly turning a JSON fixture into INSERT statements for a unit test are all common reasons to convert JSON to SQL. Use it to convert json to mysql insert, json to postgresql insert, or json to sqlite insert statements, as a json to sql online converter that can generate sql insert from json, turn a json array to sql insert, and handle a bulk insert from json or json to sql batch insert job in one pass.