THE PRACTICAL GUIDE · NORMANDIN SYSTEMS
Get more from Json to SQL DDL
Json to SQL DDL converts JSON sample data to SQL CREATE TABLE. The tool infers column definitions from the values and structure visible in a sample. Inference provides a useful starting point, but one sample cannot describe every valid future record. Check the SQL dialect, lengths, nullable columns, primary keys, indexes, and precision. Generated DDL is a draft and should be reviewed before execution. Include null values, empty collections, optional fields, and several representative records when reviewing the inferred structure. Compile or validate the generated draft in the target project. Use the worked example to understand what a successful result looks like, then compare it with a small sample of your own input. Keep the original available until you have checked the output in its destination. Conversion establishes a representation; it does not establish that the underlying information is correct or that the receiving application accepts every supported feature.
Guide updated October 13, 2026
How to use this tool
- Enter or load JSON sample data using the input controls. Begin with the worked example or a small sample for which you know the expected result.
- Review any available conversion options, then inspect the SQL CREATE TABLE result. Resolve a reported parse error at its source before attempting to reuse the output.
- Check the example below against your own data. Include null values, empty collections, optional fields, and several representative records when reviewing the inferred structure. Compile or validate the generated draft in the target project.
- Copy or save the resulting SQL CREATE TABLE content using the controls provided, then validate it in the application or parser that will actually consume it.
SEE IT IN PRACTICE
A worked example
{"name":"Ada","score":10,"active":true}A CREATE TABLE draft with text name, numeric score, and boolean active columns
The example supplies a string, a number, and a boolean. These give the generator evidence for three different column definitions; exact names and formatting follow the tool options.
Nested JSON needs a relational decision
A nested object or an array of child records does not uniquely determine a relational layout. Options include related tables, a JSON column, or a flattened set of columns, depending on query and integrity requirements. Inspect how the draft handles the sample’s structure and decide whether that representation suits the database. Generating CREATE TABLE text does not design relationships or perform a migration.
Inference cannot choose the database design
A sample can suggest column names and basic types, but it cannot determine a primary key, unique constraints, indexes, relationships, or appropriate text limits. A numeric example also does not reveal the largest future value or required decimal precision. Review the CREATE TABLE draft in the intended SQL dialect and migration workflow before executing it. Preserve identifiers as text when their exact digits or leading zeros matter.
When this tool is useful
- Prepare SQL CREATE TABLE models for API responses while retaining a separate copy of the source.
- Use a small example to troubleshoot field-type and nesting assumptions and identify a representation mismatch.
- Create SQL CREATE TABLE scaffolding for application code without manually rewriting every field or symbol.
Tips for a better result
- Check the SQL dialect, lengths, nullable columns, primary keys, indexes, and precision. Generated DDL is a draft and should be reviewed before execution.
- Include null values, empty collections, optional fields, and several representative records when reviewing the inferred structure. Compile or validate the generated draft in the target project.
- After changing formats, compare meaningful values rather than whitespace alone. Read the SQL CREATE TABLE output with its intended parser when exact types or escaping matter.
Frequently asked questions
Can I execute the result without review?
Review the dialect, names, types, nullability, keys, constraints, and migration context first.
What happens to nested objects?
A nested JSON shape needs a relational design choice. Inspect whether the output matches your intended tables or JSON columns.
Does a number sample determine precision?
No. Future range, fractional precision, and exactness requirements must guide the final database type.
What happens to the information I enter?
The utility processes your input in this browser. Some tools retain field values in browser storage or the URL; avoid entering secrets in shareable fields. Page and asset requests still go to the hosting provider. Read the privacy and offline-use notes for details.