Database diagram tool

Design database diagrams and system diagrams, together.

DB Planner is a free online database planner and database diagram tool. Plan the tables, columns, and relationships before you write the code. It turns DBML or imported SQL into interactive ER diagrams, and Mermaid into class diagrams and flowcharts, on one live blueprint your whole team edits in real time.

Free plan, no card needed. See pricing

Everything a schema needs, on one board

Readable DBML as the source of truth, a live shared canvas, and designs that leave the board as working code.

  • ERD

    Interactive ER diagrams from DBML

    Typed fields, primary and foreign key badges, enums as their own cards, and curved relationship lines that highlight on hover.

    ER diagram tool →
  • USE

    Modular, multi-file schemas

    Split a schema across as many DBML files as you like. Tables and enums reference each other across files automatically, with no import lines to maintain.

    DBML editor →
  • LIVE

    Real-time collaboration

    Everyone signed in sees the same board. Live presence, shared layout, and organizations with owner, admin, and member roles.

    Database design for teams →
  • OUT

    Import SQL, export working code

    Paste a dump from PostgreSQL, MySQL, or SQL Server to get a diagram in seconds. When the design settles, export it back out as C# models, SQL, or DBML on Pro.

    SQL to ER diagram →
  • TXT

    A real code editor built in

    Edit DBML with syntax highlighting, bracket matching, and in-editor find, and watch the diagram update as you type.

  • NOTE

    Sticky notes, table notes, field notes

    Drop draggable sticky notes anywhere on the board. Write table and column notes in the DBML and they render on the card.

From SQL dump to shared diagram

Bring the database you already have. DB Planner converts PostgreSQL, MySQL, and SQL Server DDL into clean DBML and lays out the ER diagram for you, with undo and redo, zoom toward the cursor, and one-click auto-arrange. Ship the result as C# models with EF annotations, SQL with per-dialect type-compatibility warnings, or plain DBML.

Turn your SQL into an ER diagram

schema.dbml postgres → dbml
Table users {
  id uuid [pk]
  email varchar [not null]
}

Table orders {
  id uuid [pk]
  user_id uuid [ref: > users.id]
  status order_status
}
Model Context Protocol

Connect your AI agent to your schemas

DB Planner speaks MCP, so an AI client like Claude or Cursor can read and edit your projects, documents, and board directly. Add one URL, approve it once in the browser, and your agent works on the same live schema your team does.

AI database design over MCP

  1. 1

    Add the server

    Run one command in Claude Code:

    claude mcp add --transport http db-planner https://api.dbplanner.io/mcp

    or add it to your .mcp.json:

    .mcp.json
    {
      "mcpServers": {
        "db-planner": {
          "type": "http",
          "url": "https://api.dbplanner.io/mcp"
        }
      }
    }
  2. 2

    Approve once in the browser

    Sign in and choose the access you grant. Read and write are separate scopes, enforced on the server.

  3. 3

    Ask it to design

    The agent works with your real tables, not a copy.

How DB Planner compares

The DBML workflow you know, built out for teams. Where DB Planner goes further than single-file diagram editors:

How DB Planner compares to typical DBML editors
FeatureDB PlannerTypical DBML editors
Multi-file schemasYes, with no import lines to maintainOne file per diagram
Real-time team collaborationIncluded in an organization, $5 per seatReserved for pricier team tiers
Code exportC# models, SQL in three dialects, DBML (Pro)Usually SQL and images
Notes on the diagramSeven-color sticky notes + markdown table and column notesVaries

Start from a template

Real database schemas, already worked out, each with a rendered ER diagram you can open in the browser without an account. Copy one into your workspace and change it from there.

Browse database schema templates and ER diagram examples →

From the articles

Guides on schema design, DBML, and ER diagrams.

Database diagram questions

What is a database planner?

A database planner is a tool for mapping out a database before you build it: the tables, the columns and their types, the keys, and the relationships between tables. DB Planner is a free online database planner. You write the schema in DBML or import existing SQL, it draws the ER diagram, and your team reviews and changes the plan together before it becomes a migration.

Is DB Planner a free database diagram tool?

Yes. The Free plan is $0 forever for one project with ten documents. It includes the full diagram, the DBML editor, SQL import, and DBML, Mermaid, and SQL exports, with ads. No card is needed. Pro is $5 a month after a 7-day free trial and adds unlimited projects, every export including C# models and board images, live shared boards, version history, and no ads. Each added team seat is $5.

What is the difference between a database diagram and an ER diagram?

An ER (entity relationship) diagram is the most common kind of database diagram: tables as boxes, columns inside them, and relationships as lines between them. "Database diagram" is the broader term. DB Planner draws ER diagrams from DBML or imported SQL, and can put Mermaid class diagrams and flowcharts on the same board.

Can I create an ER diagram from an existing database?

Yes, two ways. Export the schema from PostgreSQL, MySQL, or SQL Server as SQL and import it: DB Planner converts the DDL to DBML and lays out the diagram, with no credentials needed. Or, on a paid plan, connect to the database directly: DB Planner reads the table definitions (never your rows), keeps no credentials, and lays the tables out by their relationships.

Which databases does DB Planner support?

SQL import and SQL export both cover PostgreSQL, MySQL, and SQL Server (MSSQL). Schemas are written in DBML, which is database-neutral, and on Pro can also be exported as C# model classes.

Put your schema on the board

Start on the free plan and design your database with your team. Try Pro free for 7 days, then $5 a month.

Start designing free