🗄️ ER Diagram Designer
Sketch database schemas visually — add tables, define columns with types and keys, and draw relationships between them. Export the finished diagram as a PNG.
Drag a column's dot onto another column to relate them. Click a table's header to drag it.

ER Diagram Designer — Design Database Schemas Online

The ER Diagram Designer lets you visually design database schemas — add tables, define columns with data types and PK/FK keys, and draw relationships between them — then export the result as a PNG. It's built for developers, analysts, and students who need to create an ER diagram online while planning a database structure, documenting an existing schema, or studying entity-relationship modeling, without installing dedicated database design software.

⚡ Key Takeaways

  • Visually models tables, typed columns, and PK/FK relationships between them.
  • Connects specific columns to each other, not just whole tables.
  • Twelve common SQL data types available directly from a dropdown per column.
  • A planning and documentation aid — it doesn't generate or run actual SQL DDL.

What, Who, When & Why

What it's forA visual tool for designing database schemas — tables, typed columns, keys, and relationships between them.
Who it's forDevelopers, analysts, and students planning or documenting a database structure.
When to use itBefore writing CREATE TABLE statements, or when documenting or teaching an existing schema's structure.
Why it's neededPlanning a schema in text or in your head makes relationships hard to visualize; a diagram makes table connections immediately clear.
Best way to use itMark primary and foreign keys as you go, and connect specific columns (not just whole tables) to precisely represent each relationship.

How to Use the ER Diagram Designer

  1. Click Add Table to create a new table with starter columns.
  2. Rename the table using its header, then add or edit columns with a name, data type, and PK/FK badges.
  3. Drag a column's blue dot onto another column to draw a relationship line between them.
  4. Click a relationship line to select it, then click 🗑 to delete it, or drag an endpoint to repoint it.
  5. Drag a table's header to move it, or its corner handle to resize it.
  6. Click 📸 to export the finished diagram as a PNG.

Available Column Data Types

Each column can be assigned a data type from a dropdown, including: INT, BIGINT, VARCHAR, TEXT, BOOLEAN, DATE, DATETIME, TIMESTAMP, FLOAT, DECIMAL, UUID, and JSON — covering the most common types used across relational database systems.

Example

A simple two-table schema might have a users table with columns id (INT, PK) and email (VARCHAR), and an orders table with id (INT, PK) and user_id (INT, FK). Dragging a connection from the users.id column to orders.user_id visually represents the one-to-many relationship between customers and their orders — exactly the kind of relationship a foreign key enforces in a real database.

Key Features

  • Add unlimited tables, each with editable names and columns.
  • Twelve common SQL data types available per column.
  • Primary Key (PK) and Foreign Key (FK) badges for each column.
  • Drag-to-connect relationships between specific columns, not just whole tables.
  • Repointable and deletable relationship lines.
  • Drag-to-reorder columns within a table.
  • Color-coded tables for visual organization.
  • Resizable tables and a full-screen expand mode.
  • Export the finished schema diagram as a PNG.
  • Auto-saves to your browser between visits.

Practical Use Cases

  • Planning a new database: sketch out tables and relationships before writing any CREATE TABLE statements.
  • Documenting an existing schema: visually map out how an existing database's tables relate to each other.
  • Teaching or learning database design: practice entity-relationship modeling concepts with a visual, hands-on tool.
  • Reviewing schema changes: sketch a proposed schema change to discuss with a team before implementation.

Related Terminology

An ER diagram (Entity-Relationship diagram) visually represents a database's tables (entities) and how they relate to one another. A Primary Key (PK) uniquely identifies each row in a table, while a Foreign Key (FK) is a column that references a primary key in another table, establishing a relationship between the two.

Important Considerations

This tool is a visual planning and documentation aid — it doesn't generate or execute actual SQL CREATE TABLE statements, and it doesn't validate that your relationships match real database constraints. Use it to plan and communicate a schema design, then write the actual DDL separately.

Related Tools

Once you've planned your schema, the SQL Query Templates can help you write the actual table-creation and query SQL. For more general-purpose diagramming beyond database schemas, try the Flow Planner.

Frequently Asked Questions

Does this tool generate actual SQL CREATE TABLE statements?

No, it's a visual planning and documentation tool — it helps you design and communicate a schema, but you'll write the actual SQL DDL separately based on your design.

How do I mark a column as a primary key?

Click the PK badge next to that column to toggle it on — the badge highlights to show the column is marked as a primary key.

Can I connect specific columns, not just entire tables?

Yes, drag from a specific column's connection dot to another specific column to draw a precise, column-level relationship line.

Can I export my ER diagram as an image?

Yes, click the 📸 export button to download the complete diagram, including all tables and relationships, as a PNG image.