PERMARKET
Tools › Developer › JSON to SQL
J2S

JSON to SQL

Build CREATE TABLE and INSERTs from JSON.

Ad · Large Rectangle (336×280)

How to use JSON to SQL

Build CREATE TABLE and INSERTs from JSON.

  1. Paste an array of JSON objects into the Your text field.
  2. Type the table name you want to create.
  3. Press Run to get the CREATE TABLE statement plus one INSERT per record.

When you actually reach for this

  • You have JSON records and want to insert them into a relational table as INSERT statements.
  • You are importing an API response into a database without writing the DDL by hand.

Where this tool stops being accurate

  • Arrays and nested objects map poorly to columns; they are usually serialized to text or require a separate child table.
  • Auto type detection can mislabel a mixed column as text; review the inferred schema before loading.

Frequently asked questions

What does JSON to SQL do?

Build CREATE TABLE and INSERTs from JSON.

How do I handle a JSON array inside a record?

Either store it as a TEXT/JSON column in Postgres or MySQL 8+, or normalize it into a child table with a foreign key. This tool serializes it to a string by default.

My INSERTs have wrong types — what now?

Adjust the generated CREATE TABLE to the correct types (keep IDs and codes as TEXT) and re-run, or cast during load.