Paste CREATE TABLE statements — get Mermaid erDiagram or DBML markup for dbdiagram.io, Notion, GitHub.
Output will appear here.
Paste your SQL schema and instantly get a Mermaid erDiagram
block — ready to embed in GitHub Markdown, Notion, or your README — or
DBML markup that drops directly into dbdiagram.io.
Foreign keys, primary keys, and column types are detected automatically.
Input SQL:
CREATE TABLE users ( id INT PRIMARY KEY, email VARCHAR(255) NOT NULL UNIQUE ); CREATE TABLE orders ( id INT PRIMARY KEY, user_id INT REFERENCES users(id), amount DECIMAL(10,2) );
Mermaid output:
erDiagram
users {
INT id PK
VARCHAR email
}
orders {
INT id PK
INT user_id FK
DECIMAL amount
}
users ||--o{ orders : "user_id"
Embed a Mermaid block under your repo's "Schema" section so the diagram updates with the SQL.
Pair design docs with diagrams that don't drift from the implementation.
Paste the Mermaid block into a code block — most knowledge bases render it.
Use DBML output to round-trip into dbdiagram.io for shareable interactive diagrams.
Does it understand foreign keys? Yes — both inline REFERENCES clauses and standalone FOREIGN KEY constraints. Each FK becomes a relationship line in the diagram.
Which SQL dialects can I paste? Any dialect whose CREATE TABLE grammar uses parentheses and ends with a semicolon — Postgres, MySQL, Snowflake, SQL Server, SQLite. Backticks, brackets, and double-quotes are all stripped.
Where do I render the Mermaid output? Any Markdown renderer that supports Mermaid (GitHub, GitLab, Notion, Obsidian) or paste it into mermaid.live for a live preview.
Is anything saved? No — your SQL is parsed in-memory and discarded. No accounts, no logs, no AI calls.