
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.
| If you need to... | Start with | Why | Watch out for |
|---|---|---|---|
| Design tables and export SQL without an account | drawDB | Open source (AGPL-3.0); imports and exports DDL for six SQL databases | Cloud sync, AI assistant and team features are paid |
| Write a schema as code and keep diagrams private | dbdiagram.io | DBML text becomes a diagram; SQL import and export on the free plan | Free plan limited to 10 diagrams |
| Visualize an existing database quickly | ChartDB | One "Smart Query" returns your schema without sharing credentials | Free cloud plan limited to 1 database and 10 tables |
| Draw ERDs offline with other diagrams | draw.io | Apache-2.0, no account, desktop apps for Windows, macOS and Linux | SQL import creates tables only; draw relationships yourself |
| Practice ER modeling for a course | ERDPlus | Crow's Foot and Chen notation, ER-to-relational conversion, SQL generation | Saving work requires a free account; ad-supported |
| Model a MySQL database on the desktop | MySQL Workbench | GPL Community Edition from Oracle | Check modeling features in the current 26.x release |
| Model a PostgreSQL database in depth | pgModeler | GPL-3.0, SQL and live-server export | Free edition is source code; installers and reverse engineering are paid |
| Use polished templates with a team already on Lucid | Lucidchart | Crow's Foot shapes, schema import, real-time editing | Free plan: 3 editable documents, 75 shapes each |
| Keep the ERD next to specs, decisions and tasks | AFFiNE | Whiteboard and documents in one workspace; local-first apps | No ERD-specific connectors or SQL generation |
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.
| Tool | License | Where it runs | SQL import | SQL export | Free-plan limit worth knowing |
|---|---|---|---|---|---|
| drawDB | AGPL-3.0 | Browser; self-host with Docker | DDL script | MySQL, PostgreSQL, SQLite, MariaDB, SQL Server, Oracle | Unlimited local diagrams stored in your browser; cloud sync, AI and team permissions are paid |
| ChartDB | AGPL-3.0 | Browser; self-host with Docker | Live database via Smart Query (7 database types) | SQL, DBML, JSON, image | 1 user, 1 database, up to 10 tables |
| draw.io | Apache-2.0 | Browser; desktop apps | DDL to table shapes | Not documented | None for diagrams; no account required |
| dbdiagram.io | Proprietary | Browser | Yes | Yes | 10 diagrams, 1 diagram view; private mode included since October 2026 |
| ERDPlus | Proprietary (free, ad-supported) | Browser | Not documented | SQL generation | Account needed to save |
| MySQL Workbench | GPL (Community Edition) | Desktop | See note | See note | MySQL only |
| pgModeler | GPL-3.0 | Desktop | Paid edition only | SQL file and live server | Ready-made installers are paid |
| Lucidchart | Proprietary | Browser | Database schema import | Not checked | 3 editable documents, 75 shapes each |
| AFFiNE | MIT editor; separately licensed server components | Desktop, mobile, browser; self-host | No | No | Free 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.
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.
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.
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.
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).
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.
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.
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.
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.
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.

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.
| Tool | Free option | Why it is not in the main list |
|---|---|---|
| SmartDraw | No permanent free plan; a free trial only | A paid general diagramming suite. Worth a trial if your company already licenses it |
| Miro | Free plan with 3 editable boards | A whiteboard with ERD templates and AI diagram generation, but no SQL import or export on the free plan |
| FigJam | Figma Starter plan with 3 FigJam files plus unlimited drafts | Good for sketching a schema with designers; no database features |
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.

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.

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.

An enhanced ER diagram (EERD) adds concepts such as supertypes and subtypes, for example a Payment entity specialized into CardPayment and BankTransfer.
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:
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)
);
1 : 0..N. AFFiNE connectors do not have Crow's Foot ends, so the label carries the meaning.post_categories exists, and any open questions.posts.author_id, not users.post_id).NOT NULL rules.An ERD describes how data is structured. Other diagrams describe the system around it:
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.
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.
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.
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.
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.
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.
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.
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.