PlantUML ER Diagram Online

Create a PlantUML ER diagram online, model entities and cardinalities, preview the schema, and export PNG or SVG.

PlantUML ER Diagram Online Editor

Start with the ER Diagram template, edit the PlantUML source, and preview the result live.

Use this focused er diagram tool for quick previews and exports. Open the full editor for AI generation, syntax repair, sharing, and saved projects.

Diagram preview

Create a PlantUML ER Diagram Online

Model entities, attributes, primary and foreign keys, identifying relationships, optionality, and cardinality in an editable PlantUML workspace with live preview and PNG or SVG export.

Built-in ER Diagram template

Start from valid PlantUML source designed for a practical er diagram.

Live diagram preview

See the rendered diagram update as you edit the PlantUML source.

Focused er diagram guidance

Learn the syntax and modeling choices used for database design, schema reviews, data modeling, migration planning, and API data documentation.

PNG and SVG export

Download a shareable PNG or scalable SVG from the same source.

No local setup

Create and preview PlantUML without installing Java, Graphviz, or an IDE extension.

Continue in OnUML

Move to the full editor for AI generation, repair, sharing, and saved projects.

How to Create a PlantUML ER Diagram

Use the built-in template to create a er diagram for database design, schema reviews, data modeling, migration planning, and API data documentation.

  1. 01

    Start with the built-in Entity Relationship Diagram template.

  2. 02

    Rename the sample entities and list important fields.

  3. 03

    Mark primary and foreign keys where they clarify the schema.

  4. 04

    Connect entities with the correct optionality and cardinality.

  5. 05

    Preview and export the ER diagram as PNG or SVG.

PlantUML ER Diagram Syntax and Use Cases

Learn the core syntax and modeling decisions behind a useful er diagram, then apply them directly in the online editor above.

Entities and Attributes

Declare each table or domain entity with the entity keyword and list fields inside braces. Add stereotypes such as <<PK>> and <<FK>> to document key roles visually. PlantUML displays these labels but does not validate database constraints.

Crow’s Foot Cardinality

Use Crow’s Foot endpoint symbols to express exactly one, zero or one, one or many, and zero or many. The symbols are mirrored according to which side of the relationship they appear on—for example, o{ is the right-side form of zero or many, while }o is its left-side form. Choose cardinalities from business rules rather than current sample data.

customer ||--o{ order : places
order ||--|{ line_item : contains

Primary and Foreign Keys

Use <<PK>> and <<FK>> labels consistently so readers can connect logical relationships to concrete schema fields. Treat them as documentation annotations, not enforced constraints, and keep the diagram focused on meaningful columns.

ER Diagrams vs Class Diagrams

ER diagrams focus on persisted data, keys, and cardinality. Class diagrams can include behavior, interfaces, inheritance, and other object-oriented concepts. Use the diagram type that matches the review question.

PlantUML ER Diagram Example

The editable example demonstrates a practical er diagram. Change the source, check the live preview, and export the version you need.

@startuml
entity "User" as user {
  * id : int <<PK>>
  * email : string
  name : string
}

entity "Order" as order {
  * id : int <<PK>>
  * user_id : int <<FK>>
  total : decimal
}

user ||--o{ order
@enduml

Why Use PlantUML for ER Diagrams

PlantUML keeps er diagrams in reviewable text, making them easier to update, version, reuse, and export as the design changes.

Start from the right diagram type

Open directly into a ER Diagram template instead of adapting an unrelated example.

Keep the model reviewable

Store the diagram as readable text that works well in documentation and version control.

Preview before sharing

Check structure, labels, and relationships before exporting the rendered diagram.

Frequently Asked Questions

What is a PlantUML er diagram online tool?

It is a browser-based editor that starts with a ER Diagram template and lets you edit PlantUML source, preview the rendered diagram, and export PNG or SVG without local setup.

What can I model in a er diagram?

Use it to model entities, attributes, primary and foreign keys, identifying relationships, optionality, and cardinality. Common uses include database design, schema reviews, data modeling, migration planning, and API data documentation.

How do I show a one-to-many relationship in PlantUML?

Use Crow’s Foot cardinality on the relationship, for example customer ||--o{ order to show one customer associated with zero or many orders.

Can I mark primary and foreign keys?

Yes. Add stereotypes such as <<PK>> and <<FK>> beside attributes to document their roles. PlantUML renders these annotations but does not validate the underlying database constraints.

Can I export the er diagram as PNG or SVG?

Yes. Preview the diagram, then download PNG for slides and quick sharing or SVG for scalable documentation and web use.

Do I need to install PlantUML, Java, or Graphviz?

No. The online tool uses a server-backed preview, so you can edit and render the diagram directly in the browser.

Need AI-Assisted Diagram Editing?

Open the full OnUML editor for AI generation, syntax repair, sharing, saved projects, and multi-format diagram workflows.

Open Full Editor