We use cookies.This website uses essential cookies to operate core features. With your consent, we also use analytics cookies to understand traffic and improve the service. For more details, see our .
Was this tool helpful to use?
Your feedback helps us make it better
Read one MySQL CREATE TABLE definition into JSON metadata while preserving attributes, constraints and table options.
Read one MySQL CREATE TABLE column list. Column attributes, constraints and table options are preserved as SQL text; this does not generate JSON Schema or execute SQL.
Overview
Understand what the tool solves, how it works, and the boundaries of its data.
Paste one MySQL CREATE TABLE statement to turn its table name, column definitions, constraints, and trailing table options into a JSON object. Use it for a readable field inventory or metadata file to review and adapt.
The object has five top-level properties: dialect identifies MySQL; tableName gives the recognized name; fields lists columns in order; constraints collects table-level constraints and indexes; and tableOptions retains text after the column list. Each field has name, type, length, and attributes. Types are uppercase; arguments and attributes remain text.
VARCHAR(120) NOT NULL yields type VARCHAR, length "120", and attributes "NOT NULL". DECIMAL(10,2) keeps "10,2" as text rather than a precision model. A primary key declared at table level appears in constraints; engine or character-set clauses appear in tableOptions.
This follows MySQL’s separation of column definitions, constraints, and table options. The output is JSON metadata, not a validated SQL syntax tree or JSON Schema. JSON represents objects and values; JSON Schema is a separate vocabulary for describing and validating JSON instances.
Guide
Follow the workflow and verify inputs and outputs with practical examples.
Enter a single MySQL CREATE TABLE statement with a column list, or load the included example.
Review tableName and the ordered fields array. Compare field attributes, constraints, and table options with the original; these remain SQL text rather than normalized flags.
Copy the generated JSON or download ddl-converted.json for review or further scripting.
A definition with id INT NOT NULL, email VARCHAR(120), and PRIMARY KEY (id) yields two fields and a separate primary-key constraint.
Use cases
See how the tool fits into real work and everyday tasks.
Extract names, types, and arguments, then add descriptions in your documentation.
Compare field order and retained SQL text with a proposed table definition. Check key and default behavior against the source.
Use the fields array as a starting point for a column list or documentation outline, then add workflow-specific rules.
Q&A
Find concise answers to common questions and confusing cases.
No. It emits JSON metadata and does not generate properties, required, or JSON types from MySQL types.
Recognized definitions remain as SQL text in field attributes, constraints, or table options. They are not validated or normalized into flags or migration instructions.
No. This is for one MySQL CREATE TABLE statement. It does not convert INSERT data. Multiple statements, malformed input, and unsupported column types show an input error.
Notes
Review scope, result limitations, and important precautions before use.
This bounded reader is not a MySQL server or complete SQL validator. A JSON result does not prove the statement will execute or preserve every semantic detail.
Related
Discover related tools, collections, and available API capabilities.