SQL to ER Diagram
Home › MySQL

MySQL to ER Diagram

Paste your MySQL CREATE TABLE statements (or a mysqldump) and get a clean, interactive entity-relationship diagram — tables, columns, keys and foreign keys, drawn automatically.

Open the diagram tool →
No signup · nothing uploaded · export PNG / SVG / Mermaid / DBML · shareable link

How it works

  1. Dump your schema with mysqldump --no-data your_db, or copy your CREATE TABLE statements.
  2. Paste it into the editor — MySQL is parsed automatically.
  3. Every table is rendered with its columns; FOREIGN KEY constraints become relations.
  4. Arrange, hide tables, then export PNG/SVG or share a link.

Example

A MySQL schema like this:

CREATE TABLE customers (
  id INT AUTO_INCREMENT PRIMARY KEY,
  email VARCHAR(255) NOT NULL UNIQUE
) ENGINE=InnoDB;

CREATE TABLE orders (
  id INT AUTO_INCREMENT PRIMARY KEY,
  customer_id INT NOT NULL,
  FOREIGN KEY (customer_id) REFERENCES customers(id)
) ENGINE=InnoDB;

…renders two tables with a relation from orders.customer_idcustomers.id. Try it with your own →

Why use it

MySQLMariaDBPostgreSQLSQLiteSQL Server

FAQ

How do I turn a MySQL database into an ER diagram?

Export the schema with mysqldump --no-data (or copy your CREATE TABLE statements), paste it in, and the diagram is drawn instantly with foreign keys as relations.

Does it work with mysqldump output?

Yes. Paste the dump as-is — it reads CREATE TABLE definitions and FOREIGN KEY constraints, ignoring the INSERT data.

Is my schema uploaded anywhere?

No. Everything runs locally in your browser — your schema is never uploaded to or stored on any server.

Can I export the diagram?

Yes — export a high-resolution PNG or vector SVG, copy the schema as Mermaid, DBML or PlantUML, or share a link that encodes the whole diagram in the URL.

Is it free?

Yes. It is completely free and open source, with no account or sign-up required.

Related