How to use SQL DDL to ER Diagram
- Paste supported CREATE TABLE statements.
- Generate the diagram and inspect declared columns and keys.
- Download the SVG and Mermaid source, then check them against your database design.
Example: SQL DDL to ER Diagram
CREATE TABLE people (id INTEGER PRIMARY KEY, name TEXT);
Options
- Table declarations
- Enter supported CREATE TABLE statements with explicit columns and keys. Unsupported statements or dialect syntax need review before they can be represented.
- Relationships
- Edges come from declared foreign keys. The diagram does not infer relationships from similarly named columns or guess data cardinality.
Supported inputs and limits
Where your input is processed
This tool processes your input in this browser. Your text and files are not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.
Keep original names with the diagram
The SVG displays original names, while Mermaid uses generated identifiers and a separate name map. Include that mapping when adapting the Mermaid source. A relationship picture can help review a schema draft, but it does not run migrations, inspect existing data or prove that a database currently enforces the constraints.
Questions about SQL DDL to ER Diagram
Does this run the SQL?
No. It reads supported declarations in the browser.
Are all database dialects supported?
No. Unsupported types, constraints or statement forms are refused.
Where do the relationship lines come from?
Only declared foreign keys create relationships; the tool does not infer row counts or business rules.