📖
SQL DDL to Mermaid ERD & Database Diagram Guide
Transform CREATE TABLE SQL statements into interactive entity relationship diagrams (ERD) powered by Mermaid.js. Visualize table structures, primary keys, and foreign key relationships with zero server upload, and export high-resolution SVG, PNG, or Markdown code.
🔒Technical Specifications & Local Processing Architecture
DDL statements are parsed in client-side JavaScript using regex pattern matching that recognizes composite keys, constraint clauses, table quotes, and comments. Diagram rendering is performed locally by mermaid.js directly into browser SVG elements without calling any external rendering APIs.
✨ Core Capabilities
- •Universal SQL compatibility: supports CREATE TABLE DDL from MySQL, PostgreSQL, Oracle, SQLite, and SQL Server.
- •Automated relationship mapping: detects CONSTRAINT FOREIGN KEY and inline REFERENCES to draw one-to-many ERD lines.
- •High-resolution export: download crisp vector SVG or 2x scaled PNG images ready for architectural presentations and documentation.
- •1-click Markdown copy: export Mermaid syntax code directly for embedding into GitHub READMEs, PR reviews, Notion, and Obsidian.
- •100% in-browser processing: your confidential database schemas and column definitions never leave local memory.
🚀 Step-by-Step Guide
- 1Paste your CREATE TABLE DDL statements into the left SQL editor, or click "Load Sample" to try the demo schema.
- 2View the rendered Mermaid ERD diagram in real-time on the right panel.
- 3Use the zoom controls (+ / -) to inspect complex schemas, or switch to the "Code" tab to view raw Mermaid markdown.
- 4Click "SVG 저장" or "PNG 저장" to download the diagram, or copy the Mermaid code to your clipboard.