JSON → SQL

Generate a CREATE TABLE statement from flat JSON rows.

Private by design. Your input never leaves this browser. Conversions run locally on your device.

What this tool handles

  • Emits CREATE TABLE for PostgreSQL or SQLite from a flat object or an array of similar objects.
  • Nested objects and arrays are stored as JSONB on PostgreSQL and TEXT on SQLite.
  • Column types come from the sample; widths, indexes, constraints and foreign keys are not inferred.
  • Identifiers are escaped for the selected dialect.

Example

JSON rows

[{"id":1,"name":"Ada","active":true}]

SQL

-- Generated by DevConvert from a JSON sample. Review before running.
-- Dialect: PostgreSQL
-- Supports a flat JSON object or an array of similar flat objects.

CREATE TABLE "my_table" (
    "id"     BIGINT  NOT NULL PRIMARY KEY,
    "name"   TEXT    NOT NULL,
    "active" BOOLEAN NOT NULL
);

Related tools

Browse all 25 tools