Free online ER diagram editor

ER diagrams from DBML code

Describe tables and relationships as text, and the diagram draws itself. Import SQL from PostgreSQL, export PNG, SVG and DDL.

  • DBML code and SQL import
  • Auto-arranged tables
  • Export PNG, SVG and DDL
  • A live link for your team

Why DBML

DBML (Database Markup Language) is an open language for describing database schemas.

It was created by Holistics, the team behind dbdiagram.io, and its source code is open. That is why ER Studio is built on it.

Reads like text

Tables, columns and relationships are clear without knowing an SQL dialect. Analysts, developers and stakeholders read it alike.

Lives in Git

It is a plain text file: diffs, reviews and change history, just like code.

An open standard

dbdiagram.io, dbdocs and other tools read the same syntax, so your schema isn't locked into one service.

Turns into SQL

Export DDL for PostgreSQL in one click, and import CREATE TABLE statements back.

DBML theory in a minute

  1. Describe a table

    A table name, then its columns: name, type and settings in square brackets.

    Table users {
      id bigint [pk]
      email varchar(255) [unique]
    }
  2. Connect tables

    A reference points to the key of another table. The sign sets the cardinality.

    Table orders {
      id bigint [pk]
      user_id bigint [ref: > users.id]
    }
    >
    many to one
    <
    one to many
    -
    one to one
    <>
    many to many
  3. Get the result

    The diagram is ready as you type. Download it or send your team a link that updates live.

The full syntax cheat sheet opens right in the editor.

Diagrams that draw themselves

These are the studio's own examples. Open any of them in the editor and adapt it to your project.

ER diagram of an online store: customers, addresses, orders, payments, products and categories
Customers, products, orders and payments. 7 tables and a table group.
ER diagram of an online school: users, courses, modules, lessons, enrollments, progress and homework reviews
Courses, lessons, students and progress. 7 tables.
ER diagram of a food delivery service: restaurants, menus, orders and couriers
Restaurants, menus, orders and couriers. 7 tables.

Join for free

The free plan keeps up to 3 schemas in your account with autosave. Export and team links are included. Need more schemas? Switch on Pro.