Skip to main content

SQL to ER Diagram

Generate Entity-Relationship diagrams from SQL DDL statements

SQL Input

Enter your SQL DDL (CREATE TABLE) statements

ER Diagram

Generated Entity-Relationship diagram

Diagram will appear here after generation

How to Use

1. Select your SQL dialect (MySQL or SQLite)

2. Enter or paste your SQL DDL (CREATE TABLE) statements

3. Click "Generate Diagram" to create the ER diagram

4. Download the diagram as SVG or PNG, or copy the Mermaid syntax

Supported SQL Features:

  • CREATE TABLE statements
  • PRIMARY KEY constraints
  • FOREIGN KEY constraints and relationships
  • UNIQUE constraints
  • NOT NULL constraints
  • Basic data types (INTEGER, VARCHAR, DECIMAL, TIMESTAMP, etc.)