Data Conversion Tools Runs in your browser Free · no account

JSON to SQL Converter

The JSON to SQL converter turns an array of objects into INSERT statements for a table you name. Every identifier is quoted so reserved words such as order and group do not break the statement, quotes inside values are escaped, and a record missing a field gets NULL rather than a misaligned row.

Options
JSON array 0 characters
SQL

Your result will appear here.

Not sure where to start? Use Load example.

Results update automatically and are calculated on your device. Nothing you type is sent to a server.

Runs in your browser. Processing happens entirely in your browser. Nothing you enter is sent to Delimiter.live.

How to use the JSON to SQL Converter

  1. Paste a JSON array of objects — each object becomes one row.
  2. Enter the table name and pick the quoting style your database uses.
  3. Read the generated statements and check the column list is what you expected.
  4. Copy or download, then review before running it anywhere that matters.

Example

Input
[{"id":1,"name":"Ada"}]
Output
INSERT INTO "users" ("id", "name") VALUES
(1, 'Ada');

Common use cases

  • Seeding a development database from an API response.
  • Turning a fixture file into inserts for a test.
  • Loading a small reference table without writing the SQL by hand.
  • Moving a handful of records between systems during a migration.

Limitations and things to watch for

  • This escapes values by doubling quotes; it does not parameterise them. The output is a script for you to read and run, not a query builder — review it before running it against anything you care about, and never paste untrusted data straight through into a live database.
  • Nested objects and arrays have no column type, so they are written as JSON text. If you need them as columns, flatten the document first.
  • No CREATE TABLE is produced, because column types cannot be inferred safely from one sample — a numeric-looking string and a real number are indistinguishable in JSON.
  • Dates are strings in JSON and are inserted as strings. Most databases will cast them, but the format has to match what the column expects.

Frequently asked questions

Why is every column name quoted?
Because reserved words are common as field names — order, group, key and user all appear constantly — and an unquoted one is a syntax error. Quoting everything is what generated SQL should do; it is never wrong, only occasionally redundant.
What happens when records have different fields?
The column list is the union of every record's keys, and a record missing one gets NULL for it. That keeps every row aligned instead of producing statements with mismatched column counts.
Is this safe against SQL injection?
The output escapes quotes correctly, but it is generated SQL, not a parameterised query. Treat it as a script to read before running. For inserting untrusted data in an application, always use parameter binding rather than generated statements.
Can it create the table too?
No. Column types cannot be inferred reliably from one sample — JSON cannot distinguish a product code that happens to be digits from a number, and guessing wrong silently corrupts data. Write the schema yourself.
Is my data uploaded?
No. The conversion runs entirely in your browser, which matters because the JSON people convert this way is usually real records.

Share this tool