Free ER Diagram Maker Online

Unsaved
Ready
Loading Monaco Editor...
Preview
Styling
ER Diagram

Free ER Diagram Maker Online

Design database schemas with entities, attributes, and relationships. Import SQL CREATE TABLE statements to auto-generate diagrams, or write Mermaid ER syntax directly.

What is a ER Diagram?

An Entity-Relationship (ER) diagram is a visual representation of a database structure. It shows entities (tables), their attributes (columns), and the relationships between them using crow's foot notation. ER diagrams are essential for database design, helping teams plan schema architecture before writing SQL. With our SQL import feature, you can paste CREATE TABLE statements and instantly generate a visual ER diagram.

Common Use Cases

  • Database design - Plan table structures, keys, and relationships before writing SQL
  • SQL schema visualization - Import existing DDL to visualize your database
  • Data modeling - Map business concepts to database entities with proper cardinality
  • Documentation - Generate visual schemas for developer and stakeholder reference
  • Migration planning - Visualize existing databases when planning refactors or migrations
  • API design - Define data models that back your REST or GraphQL endpoints

Syntax Quick Reference

ElementSyntaxDescription
EntityENTITY { }Define a database table
Attributetype nameColumn with data type
Primary Keytype name PKPrimary key column
Foreign Keytype name FKForeign key referencing another entity
Unique Keytype name UKColumn with unique constraint
Commenttype name PK "comment"Add a description to any attribute
Exactly one||Exactly one (mandatory)
Zero or oneo|Optional (zero or one)
One or more|{At least one (mandatory many)
Zero or moreo{Optional many
IdentifyingA ||--o{ B : labelSolid line — strong dependency
Non-identifyingA ||..o{ B : labelDashed line — weak dependency

Export Options

Export Mermaid ER Diagram guide

Got Mermaid code from ChatGPT? Paste it here to render and export instantly.

Get the Free Mermaid Syntax Cheat Sheet

Free Mermaid Syntax Cheat Sheet

All 21 diagram types in one PDF reference.

Frequently Asked Questions

Ready to create your own er diagram?

Open the editor with this example pre-loaded and start customizing.

Related Diagram Types