Skip to main content

SQL ERD Diagram Generator

Paste your SQL CREATE TABLE statements to instantly visualize your database schema as an entity-relationship diagram. Shows tables, column types, primary keys, foreign keys, and relationships between tables.

✓ 60K+ developers trust DevPlaybook ✓ Runs 100% in your browser ✓ No SQL sent to any server

Frequently Asked Questions

What SQL dialects are supported?▼

The ERD generator supports standard SQL CREATE TABLE syntax including PostgreSQL, MySQL, and SQLite. It parses column definitions, PRIMARY KEY constraints (both inline and table-level), and FOREIGN KEY references.

How do I add foreign key relationships?▼

Use FOREIGN KEY syntax in your CREATE TABLE: `FOREIGN KEY (column_name) REFERENCES other_table(column_name)`. The diagram will draw a connecting line between the two tables.

Can I export the diagram?▼

Yes — use the Copy SVG button to get the raw SVG markup, which you can paste into a vector editor (Inkscape, Figma, Illustrator) or embed directly in documentation.

What is an ERD used for?▼

Entity-Relationship Diagrams show database structure visually. They help developers understand table relationships, onboard new team members to existing schemas, and document database designs in technical specifications.

How are primary keys shown?▼

Primary key columns are marked with a key icon (🔑) and bold text in the table diagram. Foreign key columns that reference another table are marked with a link icon (🔗).

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →