Free ER Diagram Maker Online

Mermaid Code
Loading Monaco Editor...

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

PNG Export

High-resolution images for documents and presentations.

SVG Export

Scalable vectors for web and further editing.

PDF Export

Print-ready format for professional documentation.

Frequently Asked Questions

Related Diagram Types