JSON to MySQL
NewGenerate a MySQL CREATE TABLE statement from JSON data.
Frequently Asked Questions
Why did it ignore most of my JSON array and only use one record?
If you paste an array, this tool infers columns from the first element only. It does not scan every row for wider type coverage or optional columns.
How does it decide between VARCHAR, TEXT, BIGINT, DOUBLE, and JSON?
Strings up to 255 characters become VARCHAR(255), longer strings become TEXT, integers become BIGINT, decimals become DOUBLE, booleans become TINYINT(1), and arrays or objects become JSON. Null becomes TEXT NULL.
Why did my nested object become one JSON column instead of separate tables?
This generator does not normalize relational structure. Any nested object or array is emitted as a single JSON column, so you get a quick DDL draft instead of a full schema design.
Can I remove the automatic id column?
Yes. The checkbox controls whether the output starts with `id` as `BIGINT AUTO_INCREMENT PRIMARY KEY`. Turn it off if your sample already has its own key or you do not want a surrogate ID.
What happens to spaces or weird characters in table and column names?
They are normalized by replacing whitespace and non-alphanumeric characters with underscores, then wrapped in MySQL backticks. That keeps the SQL valid, but it may rename keys compared with your original JSON.