Convert · Runs in your browser
JSON to SQL Converter
Generate CREATE TABLE and INSERT statements from a JSON array, for PostgreSQL, MySQL, SQLite or SQL Server.
JSON
Drop a file to load it
SQL
How to use it
- Paste a JSON array of objects — each object becomes a row.
- Set the table name and SQL dialect, and choose whether to include CREATE TABLE.
- Copy the SQL or download it as a .sql file.
Column types
Types are inferred from all rows: whole numbers become INTEGER or BIGINT, decimals NUMERIC, true/false BOOLEAN (BIT on SQL Server), and everything else TEXT.
Safe escaping
Quotes in values are escaped and identifiers are quoted the way each dialect expects, so names like “order” or “user-id” work.
Nested values
Nested objects and arrays are stored as JSON text by default (JSONB on PostgreSQL). Turn on “Flatten nested” to get a column per nested field instead.
More convert tools
All free, all private, all running locally in your browser.
JSON to CSVTurn JSON arrays into spreadsheet rowsCSV to JSONTurn spreadsheets into JSONJSON to XMLConvert JSON to well-formed XMLXML to JSONParse XML into JSONJSON to YAMLConvert JSON to readable YAMLYAML to JSONConvert YAML config to JSONJSON to ExcelDownload JSON as an .xlsx fileExcel to JSONConvert .xlsx sheets to JSONSQL to JSONTurn INSERT statements into JSONJSON to MarkdownTurn JSON into a Markdown tableFlatten JSONFlatten or unflatten nested JSON