← Back to all posts

Best ER Diagram Tools in 2026: Free and Paid, Compared on a Real Database

Seven ER diagram tools sorted into the ones that read your database and the ones you draw by hand, with prices and one test on PostgreSQL 17.

On this page

Most lists of ER diagram tools mix two kinds of software: drawing tools, where you type or drag the tables in, and database tools, which read the tables from the server. If your diagram has to match a real database, you need the second kind, and DbSchema is the one to pick: it reverse-engineers the database into a diagram, lets you change the design on it, and deploys the change back.

Short answer

DbSchema is the ER diagram tool to choose when the diagram has to match a database that runs or will run. It reads the tables and foreign keys from the server, draws them, and generates the SQL that deploys a change you make on the diagram.

  • A diagram of a running database: DbSchema, free in the Community Edition.
  • One engine only: MySQL Workbench for MySQL, pgModeler for PostgreSQL.
  • A sketch for a whiteboard discussion: a drawing tool such as dbdiagram.io or draw.io.

Only database tools keep the diagram in step with the schema

The values come from each vendor's own pages, read on 3 November 2026. Prices are per user and exclude tax.

Database tools

All four read the live database, and DBeaver needs a paid edition before you can edit the design on its diagram:

ToolReads a live databaseEdits the design on the diagramFree optionPaid plan from
DbSchemaYesYesCommunity EditionPro, 294 USD one-time
DBeaverYesEnterprise, Ultimate and Team editionsCommunityEnterprise, 255 USD a year
MySQL WorkbenchYes, MySQL onlyYesCommunity EditionNot needed for modelling
pgModelerPlus edition onlyYesSource code you compilePlus, price on request

Drawing tools

None of the three reads the database from the diagram itself, so each diagram starts from text or a file you supply:

ToolReads a live databaseEdits the design on the diagramFree optionPaid plan from
dbdiagram.ioThrough a separate CLIYes, as DBML text10 diagrams and doc projectsPersonal Pro, 8 USD a month
LucidchartNo, you upload a query resultYesFree planPaid plans
draw.ioNo, you paste SQLYes, as shapesFreeFree

The first two columns decide most choices. A tool that cannot read the database gives you a picture of the schema as you entered it, right on the day you draw it, and wrong after the first migration nobody copied across by hand.

Three questions decide which kind of tool you need

Three questions sort the tools in the table:

  1. Does it connect to your database, or do you import a SQL script?
  2. When you change a table on the diagram, can it write that change to the database?
  3. Does it cover every engine you run, or only one?

A project that runs PostgreSQL next to MySQL, SQL Server or MongoDB needs one tool for all of them, or it keeps a separate diagram and a separate licence per engine. DbSchema connects to relational and NoSQL engines from the same desktop application on Windows, macOS and Linux.

Reverse engineering draws only the foreign keys someone declared

A database tool draws the lines it finds in the catalog, which means the foreign keys someone declared. This PostgreSQL schema has two declared foreign keys and one reference that was never declared:

CREATE TABLE customers (id int PRIMARY KEY, name text);
CREATE TABLE products  (id int PRIMARY KEY, name text);
CREATE TABLE orders (id int PRIMARY KEY, customer_id int REFERENCES customers(id));
CREATE TABLE order_items (order_id int REFERENCES orders(id), product_id int, qty int);

The information_schema views list what any reverse-engineering tool can see:

SELECT tc.table_name, kcu.column_name, ccu.table_name AS references_table
FROM information_schema.table_constraints tc
JOIN information_schema.key_column_usage kcu ON kcu.constraint_name = tc.constraint_name
JOIN information_schema.constraint_column_usage ccu ON ccu.constraint_name = tc.constraint_name
WHERE tc.constraint_type = 'FOREIGN KEY'
ORDER BY tc.table_name;

Result · PostgreSQL 17.6

table_namecolumn_namereferences_table
order_itemsorder_idorders
orderscustomer_idcustomers

order_items.product_id is missing. It holds product ids, but nothing in the database says so, so every tool that reads the catalog draws order_items and products with no line between them.

order_items points to orders through a declared foreign key, and to products through product_id, which has no foreign key and is added in DbSchema as a virtual foreign key
Figure 1The catalog gives the tool the solid line. The dashed one exists only once you add it to the model.

In DbSchema you drag product_id onto products.id and tick Virtual in the dialog. The virtual foreign key lives only in the DbSchema model, is drawn in another colour, and is never created in the database. Keeping it means saving the model file, which is in DbSchema Pro, and the Query Builder and the Data Explorer, also in Pro, follow it like a declared key. Model → Find Virtual Foreign Keys suggests candidates between columns with matching names.

DbSchema reads the database, edits the design and deploys the change

DbSchema connects to the database, reads its schema and draws it with the foreign key lines in place. Connecting, reverse-engineering and the diagrams are in the free Community Edition.

A large schema becomes readable in two steps. Diagram → New Diagram adds a diagram with only the tables you pick, so one model can hold a diagram per subject area, and Diagram → Auto Arrange Tables lays the tables out by their foreign keys (diagram documentation).

Two diagram tabs in one DbSchema model: the whole schema on the first, and a second diagram holding only the task tables
Figure 2One model, two diagrams: the second holds only the tables of one part of the application.

Editing the diagram changes the DbSchema model, not the database. To deploy, work offline and then connect: DbSchema compares the model with the database, lists every difference, and generates the CREATE and ALTER statements for the ones you choose (schema synchronization).

The model is one .dbs file, which you commit to Git from File → Git Collaboration (Git collaboration). File → Export As... → HTML5/PDF Documentation writes the schema as an HTML5 page, a PDF or Markdown, with the table and column comments as tooltips on the diagram (schema documentation). Saving the model file, the documentation and schema synchronization are in DbSchema Pro, at 294 USD one-time with the first year of updates or 29.40 USD a month (DbSchema purchase page). Logical and conceptual design are in DbSchema Architect.

DBeaver, MySQL Workbench and pgModeler also read the database

DBeaver

DBeaver is a database client that shows an ER diagram for the schema or table you open. The diagram is read-only until you switch to edit mode, which DBeaver's editions page, read on 3 November 2026, lists as "Database schema development (ERD Edit mode)" for Enterprise, Ultimate and Team. Enterprise costs 255 USD a year or 26 USD a month. Read DBeaver Alternative for the two side by side.

The ER diagram of a PostgreSQL schema in DBeaver Enterprise 25.0, with the Edit Mode button in the toolbar under the diagram
Figure 3DBeaver Enterprise 25.0: the diagram becomes editable with Edit Mode.

MySQL Workbench

MySQL Workbench models MySQL databases. Its free Community Edition reverse-engineers a MySQL database into an EER diagram and forward-engineers a diagram into a live database (MySQL Workbench manual). Another engine needs another tool.

pgModeler

pgModeler models PostgreSQL only, including PostgreSQL-specific objects. Its Community version is source code that you build yourself; the pre-built binaries and the import of an existing database are in the paid Plus edition, sold on a quote for 6 months, 12 months or a perpetual team licence, according to pgModeler's purchase page.

Drawing tools turn typed or pasted tables into a picture

dbdiagram.io

dbdiagram.io draws the schema from DBML, a text format you type in the browser, or from an imported SQL file. The web app does not connect to a database; its separate DBML CLI can read one and write DBML. Its pricing page lists a free plan with up to 10 diagrams and doc projects, and Personal Pro at 8 USD a month.

Lucidchart

Lucidchart builds an ERD from data you bring to it: it gives you a query, you run the query on your database, and you upload the result, as Lucidchart's help centre describes. After that the diagram is a drawing, and later changes to the database do not reach it.

An ERD in Lucidchart built with ERD Import, with the imported tables listed in the shapes panel on the left
Figure 4Lucidchart after ERD Import: the tables are shapes from here on.

draw.io

draw.io is a general diagram editor. It turns SQL CREATE TABLE statements that you paste in into table shapes, and from then on the shapes are edited like any other drawing.

DbSchema draws an existing database in one diagram

On SQLite, DbSchema opens the database file and draws its tables, views and declared foreign keys in one diagram. The same steps for other engines are in PostgreSQL ER diagrams, MySQL ER diagrams, SQLite ER diagrams and MongoDB database diagrams.

ER diagram DbSchema reverse-engineered from a SQLite file, showing 13 tables and 2 views with foreign keys drawn
Figure 5A SQLite file reverse-engineered: 13 tables and 2 views with their declared foreign keys.

For the free tools only, see Top free ER diagram tools, and for design tools beyond ER diagrams, Best Database Schema Design Tools.

Download DbSchema, connect it to the database nobody has drawn yet, and split the result into one diagram per subject area. The diagrams are free in the Community Edition. Saving the model file with its virtual foreign keys, the HTML5 and PDF documentation and schema synchronization are in DbSchema Pro.

Sources

  1. PostgreSQL information_schema.table_constraints
  2. DbSchema foreign keys
  3. DbSchema diagrams
  4. DbSchema schema synchronization
  5. MySQL Workbench manual

Create ER diagrams in minutes

DbSchema reverse-engineers your database into an editable diagram, splits a large schema across several diagrams, and exports interactive HTML5 documentation. The diagrams are in the free Community Edition; documentation export and schema synchronization are Pro.