JSON to SQL Schema Generator
Paste a representative JSON object, choose a SQL dialect, and review explicit handling choices for every nested object and array before generating tables.
Use one top-level object. A sample shows observed fields only; review inferred types before using the SQL.
Nested field handling
Choose how each object and array is represented before generating SQL.
Paste a JSON object and review nested field choices.
Paste a JSON object and review nested field choices.
A QUICK WALKTHROUGH
How to use this tool
- Paste one top-level JSON object.
- Choose a SQL dialect and decide how each nested object or array should be stored.
- Review and copy the generated CREATE TABLE statements.
Types inferred from the sample
Strings become text columns, whole numbers become integer columns, decimal numbers become floating point columns, booleans use the dialect boolean type, and null-only values become nullable text. A single sample cannot establish every future value or constraint, so review the generated types before using the SQL.
Nested values stay under your control
Each nested object can be kept in a JSON column or flattened into prefixed columns. Each array can be kept in a JSON column or emitted as a related child table with an id and value column. The selected behavior is shown for every nested field before generation.
Dialect-aware, local output
Choose PostgreSQL, MySQL, SQL Server, or SQLite. Identifiers are quoted for the selected dialect, and values are never interpolated into SQL. Parsing and generation run in your browser; no sample is uploaded.
GOOD TO KNOW
Common questions
Does the sample determine a production schema?
No. It is a starting point. Add constraints, keys, indexes, lengths, defaults, and any domain-specific types after reviewing your real data requirements.
What happens to nested objects and arrays?
Nothing is guessed silently. Each nested field has a visible selector. Objects can become JSON columns or flattened columns; arrays can become JSON columns or child tables.
Is my JSON uploaded?
No. Parsing, inference, and SQL generation happen locally in this browser.