
dbdiagram.io
Design database relationship diagrams as code with DBML
About dbdiagram.io
dbdiagram.io is a web-based tool for designing database relationship diagrams (ERDs) using a simple, code-based markup language called DBML. Developers and data analysts write schema definitions on the left and watch a clean entity-relationship diagram render in real time on the right. Built by Holistics, it is fast, keyboard-centric, and lets teams manage diagrams as code alongside version control.
Pros & Cons
Pros
- Fast, lightweight, and free to start with no credit card required
- Diagram-as-code workflow with DBML keeps you on the keyboard
- Diagrams can be version-controlled like any other code
- Clean, neat UI that renders ER diagrams in real time
- Can import existing schemas (schema.rb, models.py, SQL) and export SQL
Cons
- No real-time collaboration; editing the same diagram requires taking turns
- Learning DBML syntax adds friction for visual-first users
- No migration generation
- No AI coding assistant integration
- Some users find it lacks advanced visual database design features
Key Features
DBML diagram-as-code
Define database schemas using Database Markup Language (DBML) and see the ER diagram update instantly.
Real-time diagram rendering
Your entity-relationship diagram renders live as you type, keeping you in a fast keyboard-driven flow.
SQL generation & export
Generate SQL DDL statements from your DBML and export schemas for use in your database.
Import from existing schemas
Upload schema.rb, models.py, or SQL files to generate diagrams from an existing database structure.
Diagram sharing
Share read-only or editable links to your diagrams with teammates and stakeholders.
Image & PDF export
Export diagrams as PNG, PDF, or other formats for documentation and presentations.
Version control friendly
Because diagrams are defined as DBML text, they can be managed in Git and other version control systems.
Team workspaces
Centralized team workspace to collaborate, manage members, and handle licenses and billing in one place.
Pricing
- Free forever
- Design ER diagrams with DBML
- Real-time rendering
- Basic export options
- No credit card required
- Everything in Free
- Unlocks Pro features in your Personal Workspace
- Advanced export options
- Cancel anytime
- Centralized Team Workspace
- Invite and manage teammates
- Multiple user licenses
- Centralized billing and user management
- Customized for organizations with specific needs
- SSO
- Priority support
- Custom payment terms
Best For
Designing a new database schema
Quickly sketch out tables, columns, and relationships in DBML before implementing them in your database.
Documenting an existing database
Import an existing schema and generate a shareable ER diagram for onboarding and team documentation.
Reviewing schema changes in version control
Track DBML files in Git so schema design changes can be reviewed alongside code.
Generating SQL from a visual design
Define the schema visually-as-code and export ready-to-run SQL DDL statements.
Similar Tools

Notion
The connected workspace for docs, wikis, and projects

Visual Studio Code
Free, open-source code editor from Microsoft

Replicate
Run AI with an API

Qodo
AI-powered code integrity platform for automated testing and code review

Blackbox AI
AI coding assistant with 300+ models and autonomous agents

Pythagora
AI development platform that builds production-ready full-stack apps with multi-agent collaboration