How to use the ERD Diagram Maker
- Start from a template (blog, e-commerce, SaaS, school and more), import your existing CREATE TABLE statements, or add tables yourself.
- Add columns with types and flags (PK, NN, UQ, auto-increment). Drag a key onto another table to create the foreign key and relationship.
- Set cardinality and ON DELETE rules on each line, then export the diagram (PNG, SVG, PDF) or the SQL for PostgreSQL, MySQL, SQLite or SQL Server.
What does this tool do?
Relationships use crow's-foot notation, so one-to-one, one-to-many and many-to-many are clear at a glance — and a many-to-many line can be turned into a proper junction table in one click. Lines attach to the exact columns they join and reroute as you move tables, with auto-layout, snap-to-grid, alignment guides, search and full undo.
Everything runs in your browser: your schema is never uploaded, and it saves automatically as you work. Import reads primary and foreign keys, unique columns, defaults, indexes and CHECK constraints from your SQL.
Why use it?
- Keys, indexes and constraints.
- Crow's-foot relationships.
- SQL import and export.
- Free, private, no sign-up.
Privacy
The calculation happens instantly in your browser. The numbers you enter are not sent to our servers or saved. There's no account to create and nothing to install.
Frequently asked questions
What is an ERD?
An entity relationship diagram shows the tables in a database, their columns and how they relate — for example, one customer has many orders. It's the standard way to plan and document a database.
How do I create a foreign key?
Drag the dot next to a primary key onto another table and the matching foreign-key column is added for you, or choose “References …” in a column's settings.
Can I import an existing database?
Paste CREATE TABLE (and ALTER TABLE / CREATE INDEX) statements from PostgreSQL, MySQL, SQLite or SQL Server. Tables, keys, relationships, defaults, indexes and CHECK constraints are read and laid out automatically.
How do I show a many-to-many relationship?
Click a line and set it to many-to-many. To implement it in a real database, choose “Create junction table” and the tool adds a linking table with two foreign keys.
Which SQL dialects can I export?
PostgreSQL, MySQL/MariaDB, SQLite and SQL Server, including auto-increment syntax, foreign keys with ON DELETE/ON UPDATE rules, indexes and CHECK constraints.
Is my schema private?
Yes. The editor runs entirely in your browser and saves to this device only. Export a .json file to keep a copy or move it to another computer.
Last reviewed by the M2Toolkit team.