Code Beautifier

SQL to ERD

Parse CREATE TABLE statements and export a Mermaid erDiagram with PK/FK annotations — client-side only. · Updated

Options
sql
Mermaid ERDtext
Draft saved locally.

Options

OptionDescription
Append parsed JSON tablesAppend a JSON dump of parsed tables after the Mermaid diagram for debugging.

FAQ

What SQL dialects are supported?

Common CREATE TABLE DDL with inline REFERENCES and FOREIGN KEY constraints. Vendor-specific extensions may need simplification.

Can I render the diagram here?

This tool exports Mermaid source. Paste it into any Mermaid-compatible viewer or Markdown preview.

Are primary and foreign keys detected?

Yes. Column-level PRIMARY KEY, table-level PRIMARY KEY, REFERENCES, and FOREIGN KEY clauses are annotated.

What if I only have SELECT queries?

This exporter needs DDL. Format queries with the SQL Formatter companion instead.