ER diagram tool
Design database schemas by describing entities, their attributes, and the relationships between them as simple text. Diagram.RS renders entity-relationship (ER) diagrams live using Mermaid syntax – great for database design and documentation.
Diagram code
Preview
Theme
Default
Try an example
How to create an ER diagram online
- Start with erDiagram, then list each relationship as ENTITY_A ||--o{ ENTITY_B : label.
- Add attributes for each entity inside braces, e.g. CUSTOMER { int id }.
- Adjust the cardinality symbols to match your schema (one, many, zero-or-one, etc.).
- Export the ER diagram to document your database design.
ER diagram FAQ
- How do I create an ER diagram online for free?
- Start with erDiagram, then describe each relationship as ENTITY_A ||--o{ ENTITY_B : label. Add attributes inside braces for each entity, e.g. CUSTOMER { int id }. The diagram updates instantly in the preview.
- What do the symbols like ||--o{ mean?
- These symbols describe cardinality: || means exactly one, o{ means zero or many, |{ means one or many, and o| means zero or one – read from each side of the relationship.
- Can I show attributes and data types for each entity?
- Yes. List each attribute inside the entity's braces as 'type name', for example: ORDER { int id\n date createdAt }.