SQL DDL to ER Diagram

Paste SQL CREATE TABLE statements to instantly generate vector Entity-Relationship diagrams with tables, attributes, primary keys, and foreign key relationships.

100% Client-Side Privacy
SQL DDL Script 0 tables
Entity-Relationship Visualization Ready
Click "Render ER Diagram" to view schema.

Frequently Asked Questions

How does the SQL parser detect relationships?

The parser looks for inline REFERENCES table_name(column) and table-level FOREIGN KEY (col) REFERENCES table_name(col) constraints to map foreign key relationships between entities.

Does this tool support composite primary keys?

Yes. Both inline col INT PRIMARY KEY and table-level PRIMARY KEY (col_a, col_b) declarations are parsed and annotated with PK badges in the resulting ER entity.

Can I embed the diagram into GitHub Markdown or Notion?

Yes. Click "Copy Mermaid" to copy the generated erDiagram block and paste it directly into any markdown editor with Mermaid support.

Is my database schema uploaded or stored?

No. 100% of SQL lexing and Mermaid rendering runs locally inside your browser.