JSON to SQL Converter
Turn JSON arrays into ready-to-run SQL INSERT statements, with automatic CREATE TABLE and three dialects.
Advertisement
How it works
Paste a JSON array of objects and the converter collects every unique key as a column, infers a SQL type per column (INT, DECIMAL, BOOLEAN, VARCHAR(255) or TEXT), then emits INSERT statements — plus an optional CREATE TABLE with the inferred schema. Strings are quote-escaped, missing keys become NULL, and nested objects are stored as JSON strings in TEXT columns.
Dialect differences
MySQL uses backtick-quoted identifiers; PostgreSQL and SQLite use double quotes. Numeric and boolean types are mapped to each dialect's native equivalents.
FAQ
What JSON formats does it accept?
An array of objects (the common case) or a single object, which is treated as one row. Every unique key across all objects becomes a column; a key missing on some row is inserted as
NULL.How are nested objects and arrays handled?
Nested objects and arrays are serialized as compact JSON strings into
TEXT columns, so no data is lost. If you need fully normalized tables, flatten the JSON first.Which SQL dialects are supported?
MySQL, PostgreSQL and SQLite. Identifier quoting and column types are adjusted per dialect: backticks for MySQL, double quotes for PostgreSQL and SQLite.
Is my data uploaded anywhere?
No. Parsing, type inference and SQL generation all run locally in your browser with JavaScript. Your JSON is never sent to any server.
Advertisement