← All tools
Free tool
SQL to Mermaid ER diagram converter
Paste PostgreSQL CREATE TABLE statements and get Mermaid erDiagram code instantly, entities, attributes, keys, and relationships ready for GitHub, Notion, or your docs.
schema.sql · 33 lines
diagram.mmd · 5 tables
erDiagram
users {
uuid id PK
string email
string name
datetime created_at
}
posts {
uuid id PK
uuid user_id
string title
string body
datetime created_at
}
tags {
uuid id PK
string name
}
comments {
uuid id PK
uuid post_id
uuid user_id
string content
}
post_tags {
uuid post_id PK
uuid tag_id PK
}
users ||--o{ posts : "user_id"
posts ||--o{ comments : "post_id"
users ||--o{ comments : "user_id"
posts ||--o{ post_tags : "post_id"
tags ||--o{ post_tags : "tag_id"
Frequently asked questions
Related tools
Keep exploring
Turn it into an ER diagram
Paste your PostgreSQL connection string and get an interactive ER diagram of your own schema in under 10 seconds. No signup required.