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
- Paste a JSON object or an array of JSON objects into the input panel, or load a sample.
- Set a table name and pick a SQL dialect: MySQL, PostgreSQL, or SQLite.
- Click Generate to scan the JSON and infer a type for every column.
- Columns missing from some array items, or holding null, are generated as nullable.
- Review the generated CREATE TABLE statement in the output panel.
- 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