SQL to PlantUML ERD Converter
Paste SQL CREATE TABLE statements and get PlantUML ERD syntax with relationships, keys, and cardinality. Perfect for documentation, wikis, and team sharing.
0
Tables
0
Relations
0
Columns
Tip: Include
FOREIGN KEY constraints in your SQL to auto-detect relationships. The converter supports inline REFERENCES (PostgreSQL/MySQL) and explicit CONSTRAINT ... FOREIGN KEY syntax.
@startuml ' Paste SQL CREATE TABLE statements to generate PlantUML ERD @enduml
Need to compare two schemas?
SchemaLens diffs SQL schemas in your browser and generates migration scripts. Free for up to 15 tables.
Open SchemaLens Diff →How It Works
1. Paste SQL
Paste any CREATE TABLE dump. Supports PostgreSQL, MySQL, SQLite, SQL Server, and Oracle syntax.
2. Detect Relationships
Foreign keys are parsed into PlantUML relationships with cardinality notation: ||--o{ for one-to-many.
3. Copy & Paste
Copy the generated PlantUML code into plantuml.com, Confluence, or your documentation tool.
Supported PlantUML Features
- Tables & Columns: Every table becomes a PlantUML
entitywith typed columns. - Primary Keys: Marked with
<<PK>>stereotype and*required prefix. - Foreign Keys: Marked with
<<FK>>stereotype and drawn as relationship lines. - Cardinality Detection: NOT NULL foreign keys become
||--o{; nullable become|o--o{. - Unique Constraints: Marked with
<<UK>>badge when detected. - Auto-Increment: Detected and annotated as
<<generated>>.