All posts
Allen
Author, Content Operations Manager·Originally published Jan 28, 2026 · Updated Oct 28, 2026
Crow’s Foot ER diagram of a fictional blog schema with users, posts, comments, categories and a post_categories junction table

Free ER Diagram Tools: 9 Open Source & Online Picks (2026)

Disclosure: AFFiNE publishes this article, and AFFiNE is one of the tools it covers. How we review products

If you need a free ER diagram tool today, start with the job, not the brand. For a quick database design with SQL output, use drawDB. If you prefer writing your schema as code, use dbdiagram.io. To draw an ERD offline as part of general diagramming, use draw.io. For a classroom exercise, ERDPlus works in the browser. To keep a diagram next to the specs and tasks that explain it, use AFFiNE. The rest of this guide explains those choices, shows where each free plan stops, and walks through one complete schema example.

How we compared these tools: We read each vendor's current pricing page, documentation, and license file on October 27 and 28, 2026, and used one fictional blog schema as the shared example. We list the features each vendor documents. We did not run benchmark tests or long-term trials. AFFiNE is made by the team that publishes this blog, so we apply the same criteria to it and list its limitations below.

Quick answer: which free ER diagram tool fits your task?

If you need to...Start withWhyWatch out for
Design tables and export SQL without an accountdrawDBOpen source (AGPL-3.0); imports and exports DDL for six SQL databasesCloud sync, AI assistant and team features are paid
Write a schema as code and keep diagrams privatedbdiagram.ioDBML text becomes a diagram; SQL import and export on the free planFree plan limited to 10 diagrams
Visualize an existing database quicklyChartDBOne "Smart Query" returns your schema without sharing credentialsFree cloud plan limited to 1 database and 10 tables
Draw ERDs offline with other diagramsdraw.ioApache-2.0, no account, desktop apps for Windows, macOS and LinuxSQL import creates tables only; draw relationships yourself
Practice ER modeling for a courseERDPlusCrow's Foot and Chen notation, ER-to-relational conversion, SQL generationSaving work requires a free account; ad-supported
Model a MySQL database on the desktopMySQL WorkbenchGPL Community Edition from OracleCheck modeling features in the current 26.x release
Model a PostgreSQL database in depthpgModelerGPL-3.0, SQL and live-server exportFree edition is source code; installers and reverse engineering are paid
Use polished templates with a team already on LucidLucidchartCrow's Foot shapes, schema import, real-time editingFree plan: 3 editable documents, 75 shapes each
Keep the ERD next to specs, decisions and tasksAFFiNEWhiteboard and documents in one workspace; local-first appsNo ERD-specific connectors or SQL generation

Free ER diagram tools compared

All details were checked against each vendor's own pages on October 27 and 28, 2026. "Free" means the plan you can use without paying, not a trial.

ToolLicenseWhere it runsSQL importSQL exportFree-plan limit worth knowing
drawDBAGPL-3.0Browser; self-host with DockerDDL scriptMySQL, PostgreSQL, SQLite, MariaDB, SQL Server, OracleUnlimited local diagrams stored in your browser; cloud sync, AI and team permissions are paid
ChartDBAGPL-3.0Browser; self-host with DockerLive database via Smart Query (7 database types)SQL, DBML, JSON, image1 user, 1 database, up to 10 tables
draw.ioApache-2.0Browser; desktop appsDDL to table shapesNot documentedNone for diagrams; no account required
dbdiagram.ioProprietaryBrowserYesYes10 diagrams, 1 diagram view; private mode included since October 2026
ERDPlusProprietary (free, ad-supported)BrowserNot documentedSQL generationAccount needed to save
MySQL WorkbenchGPL (Community Edition)DesktopSee noteSee noteMySQL only
pgModelerGPL-3.0DesktopPaid edition onlySQL file and live serverReady-made installers are paid
LucidchartProprietaryBrowserDatabase schema importNot checked3 editable documents, 75 shapes each
AFFiNEMIT editor; separately licensed server componentsDesktop, mobile, browser; self-hostNoNoFree cloud: 10 GB storage, 3 members per workspace

Note on MySQL Workbench: Classic MySQL Workbench 8.0 is known for EER modeling with forward and reverse engineering. Oracle has since moved to a new 26.x release line, and its current product pages do not yet describe the same modeling workflow. Confirm that the features you need are in the version you install.

The nine tools in detail

1. drawDB: open source, visual, and SQL-ready

drawDB is a browser-based database diagram editor under the AGPL-3.0 license. You can start without an account, and your diagrams stay in your browser storage. It imports a DDL script and exports DDL for MySQL, PostgreSQL, SQLite, MariaDB, SQL Server and Oracle, plus DBML, JSON and images. You can self-host it with Docker.

  • Good fit: developers who want to draw tables and get SQL out in minutes.
  • Not a good fit: teams that expect free cloud sync or collaboration, or anyone who needs to import directly from a running database. Solo Pro adds cloud storage and an AI assistant; Team Pro adds diagram permissions and real-time collaboration.

2. ChartDB: see an existing database fast

ChartDB is also AGPL-3.0. Instead of uploading credentials, you run one "Smart Query" against your database and paste the JSON result. It supports PostgreSQL, MySQL, SQL Server, MariaDB, SQLite, CockroachDB and ClickHouse, and it exports SQL, DBML, JSON and images.

  • Good fit: documenting or reviewing a schema that already exists.
  • Not a good fit: large schemas on the free cloud plan, which allows one database with up to 10 tables. The pricing page does not say whether the same limit applies to self-hosted builds.

3. draw.io: free general diagramming, offline too

draw.io (also called diagrams.net) is Apache-2.0 licensed and needs no account. Desktop apps for Windows, macOS and Linux sit alongside the web app. Its Entity Relation shape library covers tables and Crow's Foot connectors. Arrange > Insert > Advanced > SQL turns a pasted CREATE TABLE script into table shapes, but you connect the relationships yourself.

  • Good fit: anyone who also draws flowcharts, network diagrams or architecture maps and wants one free tool.
  • Not a good fit: forward engineering. We found no documented way to generate DDL from a draw.io diagram.

4. dbdiagram.io: schema as code

dbdiagram.io turns DBML, a short text format, into a diagram. The free plan includes SQL import and export, PDF, PNG and SVG export, and up to 10 diagrams. Since an October 2026 pricing change, private diagrams are included in the free plan. The dbdiagram pricing page lists Personal Pro at $8 per month billed annually, about $96 a year (checked October 30, 2026).

  • Good fit: developers who want diagrams in code review and version control.
  • Not a good fit: stakeholders who will not read or edit code, and free-plan teams that need shared editing.

5. ERDPlus: built for learning

ERDPlus is a free, ad-supported web tool used widely in database courses. It supports Crow's Foot and Chen notation, converts an ER diagram into a relational schema, and generates SQL. A trial mode works without an account; saving requires signing up.

  • Good fit: students practicing conceptual-to-logical modeling.
  • Not a good fit: documenting a production database. We found no SQL import.

6. MySQL Workbench: desktop tool for MySQL

MySQL Workbench is Oracle's desktop tool for MySQL, with a GPL Community Edition for Windows, macOS and Linux. Version 8.0 introduced EER diagrams that could be synchronized with a live database. Oracle has since declared 8.0 end of life and released a rebuilt 26.x line.

  • Good fit: MySQL developers and administrators who want one free desktop client.
  • Not a good fit: other databases, browser-only teams, or anyone who needs the classic modeling workflow without first checking the current release.

7. pgModeler: deep PostgreSQL modeling

pgModeler is a GPL-3.0 desktop modeler built only for PostgreSQL. The free Community edition is source code you compile yourself. It exports models to SQL, PNG and SVG and can deploy them to a server. Ready-made installers, database import (reverse engineering) and diff/sync come with the paid Plus edition.

  • Good fit: PostgreSQL teams that need detailed, local, version-controlled models.
  • Not a good fit: anyone who wants a free installer or free reverse engineering.

8. Lucidchart: polished, but tight on the free plan

Lucidchart offers Crow's Foot ERD shapes, templates, database schema import and real-time collaboration. The free plan allows three editable documents with up to 75 shapes each, which a single medium-size schema can exceed.

  • Good fit: business and analyst teams already using Lucid.
  • Not a good fit: anyone who needs a free plan for more than a small diagram.

9. AFFiNE: the diagram and its documentation in one place

AFFiNE combines documents and an infinite online whiteboard (Edgeless mode) in one workspace. Desktop apps for Windows, macOS and Linux and mobile apps work local-first without an account, and you can self-host it. The editor is MIT licensed; some server components use a separate enterprise license. The free cloud plan includes 10 GB of storage and up to 3 members per workspace.

AFFiNE is not a database modeling tool. It has no ERD-specific connector ends and does not import or generate SQL. Draw table boxes with shapes and connectors, or start from the ERD template. Then write the field definitions, design decisions and open questions in a document on the same canvas.

  • Good fit: product and engineering teams whose problem is keeping the diagram, the spec and the decision history together.
  • Not a good fit: forward or reverse engineering. Pair AFFiNE with drawDB, dbdiagram.io or a database-specific modeler for SQL.

AFFiNE ERD template on the Edgeless whiteboard with User, Order, Payment and Shipment entities

Other tools you will see in search results

These tools often appear next to the nine above. They can draw ERDs, but each has a catch for anyone who wants a free ER diagram tool.

ToolFree optionWhy it is not in the main list
SmartDrawNo permanent free plan; a free trial onlyA paid general diagramming suite. Worth a trial if your company already licenses it
MiroFree plan with 3 editable boardsA whiteboard with ERD templates and AI diagram generation, but no SQL import or export on the free plan
FigJamFigma Starter plan with 3 FigJam files plus unlimited draftsGood for sketching a schema with designers; no database features

Can AI generate an ER diagram for you?

Yes, several tools now turn a text prompt into a first-draft schema. ChartDB has an AI ER diagram generator that also suggests missing foreign keys. drawDB includes an AI assistant on its paid Solo Pro and Team Pro plans. Lucidchart's free plan includes Lucid AI, and Miro's paid plans include monthly AI credits for generating diagrams. AFFiNE AI is a paid add-on that can help draft the written spec next to a diagram.

Treat an AI-generated ERD as a draft. Check every relationship's cardinality, the side that holds each foreign key, and the junction tables for many-to-many relationships before you generate SQL. The mistakes listed later in this guide are the ones AI drafts most often need fixing for.

How to choose in four questions

  1. Do you need SQL in or out? If yes, choose drawDB, dbdiagram.io, ChartDB, or a database-specific desktop modeler. A pure drawing tool will make you retype the schema.
  2. Who edits the diagram? Code-first tools suit developers. Visual tools suit mixed teams and reviewers.
  3. Where must the file live? For offline work or files you keep yourself, prefer draw.io desktop, pgModeler or AFFiNE's local apps. Self-hosted drawDB and ChartDB are options for teams that run their own servers.
  4. How big will it get? Compare your table count and diagram count with the free-plan limits in the table above before you commit.

Decision flowchart for choosing a free ER diagram tool based on SQL needs, offline use, classroom use, and keeping diagrams next to documentation

ER diagram basics you need to read any of these tools

An entity relationship diagram (ERD) shows the things a system stores data about (entities), the details stored for each one (attributes), and how they connect (relationships). In database design, entities usually become tables, attributes become columns, and relationships become foreign keys.

Two notations dominate. Chen notation draws entities as rectangles, relationships as diamonds, and attributes as ovals, which makes it common in teaching and conceptual design. Crow's Foot notation lists attributes inside table boxes and shows cardinality with symbols at each end of the line, which makes it common in database tools.

The same users-writes-posts relationship drawn in Chen notation with a diamond and ovals, and in Crow's Foot notation with table boxes and line-end symbols

Reading cardinality

Read each line end as a minimum and a maximum. The mark closest to the table is the maximum; the inner mark is the minimum. A bar means one, a circle means zero, and the three-pronged "crow's foot" means many.

Crow's Foot cheat sheet showing exactly one, zero or one, one or many, and zero or many line endings with examples

An enhanced ER diagram (EERD) adds concepts such as supertypes and subtypes, for example a Payment entity specialized into CardPayment and BankTransfer.

Worked example: one blog schema from diagram to SQL

The schema in the cover image is a fictional blog with five tables. It is small enough to fit on any free plan above and includes each relationship type you will meet first:

  • A user writes zero or many posts. Each post has exactly one author.
  • A post has zero or many comments. Each comment belongs to one post and one user.
  • Posts and categories are many-to-many, so the post_categories junction table holds one row per post-category pair. Its composite primary key prevents duplicate tags.

Here is the PostgreSQL DDL for that diagram. You can paste it into drawDB, draw.io (as table shapes), dbdiagram.io (via SQL import) or ChartDB to compare how each tool renders it.

CREATE TABLE users (
  id         uuid PRIMARY KEY,
  email      varchar(255) NOT NULL UNIQUE,
  created_at timestamptz  NOT NULL DEFAULT now()
);

CREATE TABLE posts (
  id           uuid PRIMARY KEY,
  author_id    uuid NOT NULL REFERENCES users(id),
  title        text NOT NULL,
  published_at timestamptz
);

CREATE TABLE comments (
  id      uuid PRIMARY KEY,
  post_id uuid NOT NULL REFERENCES posts(id) ON DELETE CASCADE,
  user_id uuid NOT NULL REFERENCES users(id),
  body    text NOT NULL
);

CREATE TABLE categories (
  id   uuid PRIMARY KEY,
  name varchar(80) NOT NULL UNIQUE
);

CREATE TABLE post_categories (
  post_id     uuid NOT NULL REFERENCES posts(id) ON DELETE CASCADE,
  category_id uuid NOT NULL REFERENCES categories(id),
  PRIMARY KEY (post_id, category_id)
);

Building the same model in AFFiNE

  1. Open the ERD template or a blank Edgeless canvas on the AFFiNE whiteboard.
  2. Create one shape per table and list its columns, marking primary and foreign keys.
  3. Connect the tables and label each connector with its cardinality, such as 1 : 0..N. AFFiNE connectors do not have Crow's Foot ends, so the label carries the meaning.
  4. Add a document next to the diagram with the DDL above, the reason post_categories exists, and any open questions.
  5. When the schema changes, update the diagram and the document together, then link the page from your project tasks.

Common ER diagram mistakes

  • Leaving many-to-many relationships unresolved. Relational databases need a junction table; draw it explicitly.
  • Putting the foreign key on the wrong side. In a one-to-many relationship, the foreign key goes on the "many" table (posts.author_id, not users.post_id).
  • Skipping optionality. "One" and "zero or one" produce different NOT NULL rules.
  • Inconsistent naming. Choose singular or plural table names and one case style, and keep them.
  • Treating the diagram as the documentation. Record why a relationship exists, not just that it exists.

Related diagrams for the same project

An ERD describes how data is structured. Other diagrams describe the system around it:

Frequently Asked Questions (FAQ)

Q1: What is the best free ER diagram tool?

There is no single best tool. drawDB is the strongest free choice if you want to draw tables and export SQL without an account. dbdiagram.io suits developers who prefer schema-as-code. draw.io is the most flexible free option for offline, general diagramming. ERDPlus is designed for students.

Q2: Is there an open source ER diagram tool?

Yes. drawDB and ChartDB are AGPL-3.0, draw.io is Apache-2.0, pgModeler is GPL-3.0, and MySQL Workbench Community Edition is GPL. AFFiNE's editor is MIT licensed. Open source does not always mean unlimited free hosting: hosted plans of some of these tools have limits, while self-hosting removes most of them.

Q3: Can I generate SQL from an ER diagram for free?

Yes. drawDB exports DDL for six SQL databases, dbdiagram.io includes SQL export on its free plan, ERDPlus generates SQL from its diagrams, and pgModeler Community exports SQL files. draw.io and AFFiNE do not generate SQL.

Q4: Can I draw an ER diagram online without downloading software?

Yes. drawDB, ChartDB, dbdiagram.io, ERDPlus, Lucidchart and draw.io all run in a browser. drawDB and draw.io let you start without creating an account. ERDPlus offers a trial mode but requires an account to save.

Q5: What is the difference between an ERD and an EERD?

An ERD shows entities, attributes and relationships. An enhanced ERD (EERD) adds supertypes and subtypes, specialization and generalization, which let you model inheritance, such as a Payment entity split into card and bank-transfer payments.

Q6: What are the standard ER diagram symbols?

In Chen notation, rectangles are entities, diamonds are relationships, and ovals are attributes. In Crow's Foot notation, tables list their attributes, and line ends show cardinality: a bar for one, a circle for zero, and a three-pronged foot for many.

Q7: Which ER diagram tool works offline?

The draw.io desktop app, pgModeler, MySQL Workbench and AFFiNE's desktop apps run on your computer. drawDB stores diagrams in your browser and can be self-hosted, but it is a web app.

Start with the free ERD template

If your schema needs a home next to its specs, open the free ERD template in AFFiNE or download AFFiNE for desktop. If you need SQL generation, pair it with one of the modeling tools above.

Update note (October 28, 2026): This article was first published in January 2026 and rewritten in October 2026 as a comparison of free ER diagram tools. We checked each tool's license and free plan against official pages, added SmartDraw, Miro and FigJam, added a section on AI-generated ERDs, and replaced the old images with original diagrams made by AFFiNE. AI tools assisted with drafting, and the content was reviewed and edited by the AFFiNE team.