JSON to SQL Schema

Paste JSON and get a matching CREATE TABLE statement, with column types inferred and a MySQL, PostgreSQL, or SQLite dialect picker.

Input JSON

Dialect

SQL Output

Paste JSON and click Generate

Copied!

Summary

Paste JSON and get a matching CREATE TABLE statement, with column types inferred and a MySQL, PostgreSQL, or SQLite dialect picker.

How it works

  1. Paste a JSON object or an array of JSON objects into the input panel, or load a sample.
  2. Set a table name and pick a SQL dialect: MySQL, PostgreSQL, or SQLite.
  3. Click Generate to scan the JSON and infer a type for every column.
  4. Columns missing from some array items, or holding null, are generated as nullable.
  5. Review the generated CREATE TABLE statement in the output panel.
  6. Click Copy or Download to save the SQL.

Use cases

  • Turn a sample API response into a starting database table.
  • Scaffold a table for a new project from a JSON fixture.
  • Check which fields in a JSON export are sometimes missing before writing a migration.
  • Convert a JSON config or seed file into an equivalent SQL table.
  • Draft a schema for MySQL, PostgreSQL, or SQLite from the same JSON source.
  • Document the shape of a JSON payload as a SQL table for a teammate.

Frequently Asked Questions

Last updated: 2026-07-24 · Reviewed by Nham Vu